<?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: Unity: Have scripts run while the game doesn&#8217;t</title>
	<atom:link href="http://blackish.at/blog/2010/08/unity-have-scripts-run-while-the-game-doesnt.html/feed" rel="self" type="application/rss+xml" />
	<link>http://blackish.at/blog/2010/08/unity-have-scripts-run-while-the-game-doesnt.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=unity-have-scripts-run-while-the-game-doesnt</link>
	<description></description>
	<lastBuildDate>Thu, 02 Oct 2025 17:28:23 +0000</lastBuildDate>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.0.38</generator>
	<item>
		<title>By: col000r</title>
		<link>http://blackish.at/blog/2010/08/unity-have-scripts-run-while-the-game-doesnt.html#comment-78</link>
		<dc:creator><![CDATA[col000r]]></dc:creator>
		<pubDate>Tue, 28 Dec 2010 09:29:27 +0000</pubDate>
		<guid isPermaLink="false">http://blackish.at/blog/2010/08/unity-have-scripts-run-while-the-game-doesnt/#comment-78</guid>
		<description><![CDATA[the script starts running as soon as it&#039;s done compiling, just put your code in Start or Update...&lt;br /&gt;&lt;br /&gt;I sometimes use this for building debug GUI with UnityGUI. Here&#039;s a simple script I use:&lt;br /&gt;&lt;br /&gt;using UnityEngine;&lt;br /&gt;using System.Collections;&lt;br /&gt;&lt;br /&gt;[ExecuteInEditMode()]&lt;br /&gt;&lt;br /&gt;public class DEBUGDistanceBetween : MonoBehaviour {&lt;br /&gt;&lt;br /&gt; public Transform t1;&lt;br /&gt; public Transform t2;&lt;br /&gt; &lt;br /&gt; void OnGUI () {&lt;br /&gt;  if(t1 &amp;&amp; t2) GUI.Label(new Rect(20, 20, 200, 50), (t1.position - t2.position).magnitude.ToString(&quot;#.00&quot;));&lt;br /&gt; }&lt;br /&gt;}]]></description>
		<content:encoded><![CDATA[<p>the script starts running as soon as it&#39;s done compiling, just put your code in Start or Update&#8230;</p>
<p>I sometimes use this for building debug GUI with UnityGUI. Here&#39;s a simple script I use:</p>
<p>using UnityEngine;<br />using System.Collections;</p>
<p>[ExecuteInEditMode()]</p>
<p>public class DEBUGDistanceBetween : MonoBehaviour {</p>
<p> public Transform t1;<br /> public Transform t2;</p>
<p> void OnGUI () {<br />  if(t1 &amp;&amp; t2) GUI.Label(new Rect(20, 20, 200, 50), (t1.position &#8211; t2.position).magnitude.ToString(&quot;#.00&quot;));<br /> }<br />}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike_S</title>
		<link>http://blackish.at/blog/2010/08/unity-have-scripts-run-while-the-game-doesnt.html#comment-77</link>
		<dc:creator><![CDATA[Mike_S]]></dc:creator>
		<pubDate>Mon, 27 Dec 2010 22:47:07 +0000</pubDate>
		<guid isPermaLink="false">http://blackish.at/blog/2010/08/unity-have-scripts-run-while-the-game-doesnt/#comment-77</guid>
		<description><![CDATA[Interesting, &lt;br /&gt;&lt;br /&gt;1) How do you trigger the script?&lt;br /&gt;&lt;br /&gt;The only way I found so far was to drag it onto a GameObject in the Hierarchy window.  To re-activate it,I used the &quot;Remove Component&quot; popup from the Inspector, then re-dragged the script from the Project list back onto the GameObject&lt;br /&gt;&lt;br /&gt;2)can you post a useful example ?&lt;br /&gt;&lt;br /&gt;Mike]]></description>
		<content:encoded><![CDATA[<p>Interesting, </p>
<p>1) How do you trigger the script?</p>
<p>The only way I found so far was to drag it onto a GameObject in the Hierarchy window.  To re-activate it,I used the &quot;Remove Component&quot; popup from the Inspector, then re-dragged the script from the Project list back onto the GameObject</p>
<p>2)can you post a useful example ?</p>
<p>Mike</p>
]]></content:encoded>
	</item>
</channel>
</rss>
