<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>BakedOn Entertainment - Online Multiplayer Games &#187; unity</title>
	<atom:link href="http://www.bakedon.com/tag/unity/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bakedon.com</link>
	<description></description>
	<lastBuildDate>Wed, 29 Dec 2010 17:47:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Untiy3D Asynchronous Sockets</title>
		<link>http://www.bakedon.com/2010/03/untiy3d-asynchronous-sockets/</link>
		<comments>http://www.bakedon.com/2010/03/untiy3d-asynchronous-sockets/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 20:31:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[unity]]></category>

		<guid isPermaLink="false">http://www.bakedon.com/?p=85</guid>
		<description><![CDATA[You can download this project here. There is a lot of discussion on whether you can use threading or asynchronous sockets with Unity3D and with the web player in particular. I&#8217;ve created this sample project to demonstrate how this is done.  You&#8217;ll see above that when you run it, the project attempts to make several [...]]]></description>
			<content:encoded><![CDATA[<div><a href="http://www.bakedon.com/wp-content/uploads/2010/03/unity-async-output.jpg"><img class="size-full wp-image-144 aligncenter" title="Unity3d asynchronous sockets" src="http://www.bakedon.com/wp-content/uploads/2010/03/unity-async-output.jpg" alt="" width="312" height="240" /></a></div>
<div class="download">
You can download <a href="http://www.bakedon.com/unity/asyncsocket/AsyncSocketTest.zip">this project here</a>.<br/><br/>
</div>
<p>There is a lot of discussion on whether you can use threading or asynchronous sockets with Unity3D and with the web player in particular.</p>
<p>I&#8217;ve created this sample project to demonstrate how this is done.  You&#8217;ll see above that when you run it, the project attempts to make several asynchronous connections to web servers and download their default page.</p>
<p>There are a couple of basic things you should watch out for:</p>
<ol>
<li>Calls to Unity object or the UnityEngine API must be done on the main Unity application thread. You will need to martial values back to that thread. In this example, you&#8217;ll notice I don&#8217;t update the GUIText text value directly.  I update my own internal status string and only update the GUIText during an Update( ) call.</li>
<li>You need to shut down your socket and thread operations when OnApplicaitonQuit( ) is called. Exceptions may be thrown on any asychronous callback and you need to be sure to catch and handle these.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.bakedon.com/2010/03/untiy3d-asynchronous-sockets/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

