<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Coroutines in Unity3d (C# version)</title>
	<atom:link href="http://www.blog.silentkraken.com/2010/01/23/coroutines-in-unity3d-c-version/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.blog.silentkraken.com/2010/01/23/coroutines-in-unity3d-c-version/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
	<description>Game development tips and tricks</description>
	<lastBuildDate>Mon, 09 Jan 2012 07:26:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Daniel Rodriguez</title>
		<link>http://www.blog.silentkraken.com/2010/01/23/coroutines-in-unity3d-c-version/comment-page-1/#comment-177</link>
		<dc:creator>Daniel Rodriguez</dc:creator>
		<pubDate>Sun, 07 Aug 2011 23:51:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.blog.silentkraken.com/?p=106#comment-177</guid>
		<description>If you want Object1 to wait for Object 2 it needs to yield StartCoroutine on Object2.</description>
		<content:encoded><![CDATA[<p>If you want Object1 to wait for Object 2 it needs to yield StartCoroutine on Object2.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard Hensman</title>
		<link>http://www.blog.silentkraken.com/2010/01/23/coroutines-in-unity3d-c-version/comment-page-1/#comment-176</link>
		<dc:creator>Richard Hensman</dc:creator>
		<pubDate>Sun, 07 Aug 2011 23:15:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.blog.silentkraken.com/?p=106#comment-176</guid>
		<description>Hi,

So according to Unity Docs, you can&#039;t use yield in an Update statement, but you can start a CoRoutine that does.

I am somewhat confused by this.  In my code I have two objects.  Object 1 needs to make two calls to Object 2.  Object 2, in each case, starts an animation, waits X seconds (local member of Object 2), then returns to Object 1.  So I think Object 2 code looks like:

IEnumerator MethodTwo() {
AnimationClip.play();
yield return new WaitForSeconds(x);
}

But does Object 1 need to &quot;yield&quot; at all, or can it just call MethodTwo(); directly?

Thanks,
Rich</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>So according to Unity Docs, you can&#8217;t use yield in an Update statement, but you can start a CoRoutine that does.</p>
<p>I am somewhat confused by this.  In my code I have two objects.  Object 1 needs to make two calls to Object 2.  Object 2, in each case, starts an animation, waits X seconds (local member of Object 2), then returns to Object 1.  So I think Object 2 code looks like:</p>
<p>IEnumerator MethodTwo() {<br />
AnimationClip.play();<br />
yield return new WaitForSeconds(x);<br />
}</p>
<p>But does Object 1 need to &#8220;yield&#8221; at all, or can it just call MethodTwo(); directly?</p>
<p>Thanks,<br />
Rich</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert</title>
		<link>http://www.blog.silentkraken.com/2010/01/23/coroutines-in-unity3d-c-version/comment-page-1/#comment-171</link>
		<dc:creator>Robert</dc:creator>
		<pubDate>Tue, 19 Apr 2011 18:58:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.blog.silentkraken.com/?p=106#comment-171</guid>
		<description>thanks for sharing the code for this. i really needed to know and i will use a slightly modified one in my application. What if i wanted to return more than one values. Is there any way i can do it.</description>
		<content:encoded><![CDATA[<p>thanks for sharing the code for this. i really needed to know and i will use a slightly modified one in my application. What if i wanted to return more than one values. Is there any way i can do it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cjcurrie</title>
		<link>http://www.blog.silentkraken.com/2010/01/23/coroutines-in-unity3d-c-version/comment-page-1/#comment-147</link>
		<dc:creator>cjcurrie</dc:creator>
		<pubDate>Mon, 06 Sep 2010 08:13:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.blog.silentkraken.com/?p=106#comment-147</guid>
		<description>So how do you create a coroutine that returns a value at the end?</description>
		<content:encoded><![CDATA[<p>So how do you create a coroutine that returns a value at the end?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex Schwartz</title>
		<link>http://www.blog.silentkraken.com/2010/01/23/coroutines-in-unity3d-c-version/comment-page-1/#comment-146</link>
		<dc:creator>Alex Schwartz</dc:creator>
		<pubDate>Thu, 02 Sep 2010 20:27:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.blog.silentkraken.com/?p=106#comment-146</guid>
		<description>Thanks Seth for sharing these basics. Definitely useful to those looking to learn. &lt;br&gt;&lt;br&gt;One note: I had heard that returning null is ever so slightly faster than returning 0 when yielding in a coroutine due to the allocation for creating a new variable  :)</description>
		<content:encoded><![CDATA[<p>Thanks Seth for sharing these basics. Definitely useful to those looking to learn. </p>
<p>One note: I had heard that returning null is ever so slightly faster than returning 0 when yielding in a coroutine due to the allocation for creating a new variable  <img src='http://www.blog.silentkraken.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Coroutines in Unity3d (Javascript version) - Silent Kraken</title>
		<link>http://www.blog.silentkraken.com/2010/01/23/coroutines-in-unity3d-c-version/comment-page-1/#comment-61</link>
		<dc:creator>Coroutines in Unity3d (Javascript version) - Silent Kraken</dc:creator>
		<pubDate>Sun, 24 Jan 2010 00:13:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.blog.silentkraken.com/?p=106#comment-61</guid>
		<description>[...] A coroutine looks like this (on javascript, the C# version is here): [...]</description>
		<content:encoded><![CDATA[<p>[...] A coroutine looks like this (on javascript, the C# version is here): [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

