<?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>== &#187; Development</title>
	<atom:link href="http://blog.equals-equals.com/category/dev/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.equals-equals.com</link>
	<description>Technical Artist Blog</description>
	<lastBuildDate>Mon, 04 Feb 2013 00:11:58 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>1.2.9 is out</title>
		<link>http://blog.equals-equals.com/2011/09/06/1-2-9-is-out/</link>
		<comments>http://blog.equals-equals.com/2011/09/06/1-2-9-is-out/#comments</comments>
		<pubDate>Wed, 07 Sep 2011 03:00:24 +0000</pubDate>
		<dc:creator>equalsequals</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Quad UI]]></category>
		<category><![CDATA[Unity]]></category>

		<guid isPermaLink="false">http://blog.equals-equals.com/?p=467</guid>
		<description><![CDATA[Yup. QuadUI 1.2.9b is out. It implements a screen re-size messaging system to allow for easily constructed fluid UIs. &#160; Enjoy. &#160; ==]]></description>
				<content:encoded><![CDATA[<p>Yup. QuadUI 1.2.9b is out. It implements a screen re-size messaging system to allow for easily constructed fluid UIs.</p>
<p>&nbsp;</p>
<p>Enjoy.</p>
<p>&nbsp;</p>
<p>==</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.equals-equals.com/2011/09/06/1-2-9-is-out/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>QuadUI 1.2.9b Rolling Out Soon</title>
		<link>http://blog.equals-equals.com/2011/08/31/quadui-1-2-9b-rolling-out-soon/</link>
		<comments>http://blog.equals-equals.com/2011/08/31/quadui-1-2-9b-rolling-out-soon/#comments</comments>
		<pubDate>Thu, 01 Sep 2011 03:19:22 +0000</pubDate>
		<dc:creator>equalsequals</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Quad UI]]></category>

		<guid isPermaLink="false">http://blog.equals-equals.com/?p=445</guid>
		<description><![CDATA[I&#8217;ll be rolling out 1.2.9b within the next couple days. The main feature will be a finished, integrated resolution messaging system; you will be able to reposition you UI elements with ease! &#160; Stay tuned! &#160; ==]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ll be rolling out <a href="http://blog.equals-equals.com/quadui/quad-ui-revisions/">1.2.9b</a> within the next couple days.</p>
<p>The main feature will be a finished, integrated resolution messaging system; you will be able to reposition you UI elements with ease!</p>
<p>&nbsp;</p>
<p>Stay tuned!</p>
<p>&nbsp;</p>
<p><span style="color: #00ff00;">==</span></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.equals-equals.com/2011/08/31/quadui-1-2-9b-rolling-out-soon/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Quad UI 1.2.8b released</title>
		<link>http://blog.equals-equals.com/2011/08/25/quad-ui-1-2-8b-release/</link>
		<comments>http://blog.equals-equals.com/2011/08/25/quad-ui-1-2-8b-release/#comments</comments>
		<pubDate>Thu, 25 Aug 2011 16:04:10 +0000</pubDate>
		<dc:creator>equalsequals</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[GUI]]></category>
		<category><![CDATA[Quad UI]]></category>
		<category><![CDATA[Unity]]></category>

		<guid isPermaLink="false">http://blog.equals-equals.com/?p=403</guid>
		<description><![CDATA[This has been a long time in the making, mainly due to just a complete lack of time. I&#8217;m very close to version 1.3, and a full release, now as well as an Asset Store submission. If you read the Change Logs you can see many of the roadmap features are already implemented in this release. <span class="ellipsis">&#8230;</span> <span class="more-link-wrap"><a href="http://blog.equals-equals.com/2011/08/25/quad-ui-1-2-8b-release/" class="more-link"><span>Continue Reading</span></a></span>]]></description>
				<content:encoded><![CDATA[<p>This has been a long time in the making, mainly due to just a complete lack of time.</p>
<p>I&#8217;m very close to version 1.3, and a full release, now as well as an Asset Store submission. If you read the <a href="http://blog.equals-equals.com/quadui/quad-ui-revisions/">Change Logs</a> you can see many of the <a href="http://blog.equals-equals.com/2011/06/17/road-map-quadui-1-3/">roadmap features</a> are already implemented in this release. The next step is beefing up the editor and adding a few more features for doing some more complex UI components.</p>
<p><a href="http://www.quadui.com">Give it a try</a>, and <a href="http://blog.equals-equals.com/quadui/bugs/">report any bugs</a> you find!</p>
<p>==</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.equals-equals.com/2011/08/25/quad-ui-1-2-8b-release/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Road Map: QuadUI 1.3</title>
		<link>http://blog.equals-equals.com/2011/06/17/road-map-quadui-1-3/</link>
		<comments>http://blog.equals-equals.com/2011/06/17/road-map-quadui-1-3/#comments</comments>
		<pubDate>Fri, 17 Jun 2011 15:14:48 +0000</pubDate>
		<dc:creator>equalsequals</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Quad UI]]></category>
		<category><![CDATA[Unity]]></category>

		<guid isPermaLink="false">http://blog.equals-equals.com/?p=335</guid>
		<description><![CDATA[As you are likely aware, the talented folks over at Unity Technologies have announced a tentative release for Unity 3.5 and a rebuilt UI framework. I for one eagerly await the day in which my own solution for more efficient UI can be put to rest. But until that day comes, I&#8217;m going to keep <span class="ellipsis">&#8230;</span> <span class="more-link-wrap"><a href="http://blog.equals-equals.com/2011/06/17/road-map-quadui-1-3/" class="more-link"><span>Continue Reading</span></a></span>]]></description>
				<content:encoded><![CDATA[<p>As you are likely aware, the talented folks over at Unity Technologies have announced a <a href="http://blogs.unity3d.com/2011/06/16/unity-roadmap-2011/">tentative release for Unity 3.5 and a rebuilt UI framework</a>. I for one eagerly await the day in which my own solution for more efficient UI can be put to rest. But until that day comes, I&#8217;m going to keep developing QuadUI.</p>
<p>As for some features:</p>
<ul>
<li>Complex UI Components
<ul>
<li>Selection Grid</li>
<li>Slider</li>
<li>Clock</li>
<li>Counter</li>
<li>Toolbar</li>
<li>Resizable Bar (Health bar, progress, etc.)</li>
<li>Radio Buttons</li>
</ul>
</li>
<li>Additional Primitive UI Components
<ul>
<li>Dynamic Text Button</li>
<li>Multi-State Sprite</li>
<li>Repeater Button</li>
</ul>
</li>
<li>Depth-Masked Scroll View Solution</li>
<li>Multi-touch Support</li>
<li>Improved Editor</li>
<li>Ability to generate UI components based on your own classes</li>
<li>Several bug fixes</li>
</ul>
<p>There is probably more, but I&#8217;d rather spend time working on QuadUI rather than talking about it.</p>
<p>&nbsp;</p>
<p>Stay tuned.</p>
<p><span style="color: #99ccff;">==</span></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.equals-equals.com/2011/06/17/road-map-quadui-1-3/feed/</wfw:commentRss>
		<slash:comments>196</slash:comments>
		</item>
		<item>
		<title>Quad UI is Now in Public Beta</title>
		<link>http://blog.equals-equals.com/2011/02/15/quad-ui-is-now-in-public-beta/</link>
		<comments>http://blog.equals-equals.com/2011/02/15/quad-ui-is-now-in-public-beta/#comments</comments>
		<pubDate>Tue, 15 Feb 2011 15:48:01 +0000</pubDate>
		<dc:creator>equalsequals</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Quad UI]]></category>
		<category><![CDATA[Unity]]></category>

		<guid isPermaLink="false">http://blog.equals-equals.com/?p=217</guid>
		<description><![CDATA[Last week I released version 1.2 of Quad UI, a Unity game engine extension which allows for the rapid development of 3D quad-based user interfaces. It was a relatively quiet release, thankfully. The reason I am thankful is mainly due to the fact that Unity 3.2 shipped that day as well, an update that broke <span class="ellipsis">&#8230;</span> <span class="more-link-wrap"><a href="http://blog.equals-equals.com/2011/02/15/quad-ui-is-now-in-public-beta/" class="more-link"><span>Continue Reading</span></a></span>]]></description>
				<content:encoded><![CDATA[<p>Last week I released version 1.2 of <a href="http://quadui.equals-equals.com">Quad UI</a>, a Unity game engine extension which allows for the rapid development of 3D quad-based user interfaces.</p>
<p>It was a relatively quiet release, thankfully. The reason I am thankful is mainly due to the fact that Unity 3.2 shipped that day as well, an update that broke 2 of the core features of the extension. Working fast, though, I was able to fix the problems created by Unity 3.2 and later that night version 1.2.1, a hotfix for 3.2 was released.</p>
<p>So where do I go from here?</p>
<p>The release was much more stable than I initially thought it would be (Unity 3.2 aside), as I have continued to develop content with it internally, I have not found myself making changes to the API or the Editor. Aside from a few known, non-fatal issues, I believe the product is close to an Asset Store submission. I would like to add a few more features before I get there, though.</p>
<p>The road map includes adding 2 new modes to the Editor, as well as some feature upgrades and additions to the API. You can expect v1.3 to ship in the very near future.</p>
<p>Thanks again the community again for the support.</p>
<p>Cheers,</p>
<p><span style="color: #ffff00;">==</span></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.equals-equals.com/2011/02/15/quad-ui-is-now-in-public-beta/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Introducing QuadUI for Unity 3</title>
		<link>http://blog.equals-equals.com/2011/02/01/introducing-quadui-for-unity-3/</link>
		<comments>http://blog.equals-equals.com/2011/02/01/introducing-quadui-for-unity-3/#comments</comments>
		<pubDate>Wed, 02 Feb 2011 04:08:58 +0000</pubDate>
		<dc:creator>equalsequals</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Quad UI]]></category>
		<category><![CDATA[Unity]]></category>

		<guid isPermaLink="false">http://blog.equals-equals.com/?p=195</guid>
		<description><![CDATA[Back in November I released a pre-alpha feature test video of a GUI tool I was building for use inside of the Unity 3 editor. If you haven&#8217;t read about it/seen the video you can do so here. First and foremost I just wanted to say thanks for all of the encouragement both on the <span class="ellipsis">&#8230;</span> <span class="more-link-wrap"><a href="http://blog.equals-equals.com/2011/02/01/introducing-quadui-for-unity-3/" class="more-link"><span>Continue Reading</span></a></span>]]></description>
				<content:encoded><![CDATA[<p>Back in November I released a pre-alpha feature test video of a GUI tool I was building for use inside of the Unity 3 editor. If you haven&#8217;t read about it/seen the video you can do so <a href="http://blog.equals-equals.com/2010/11/27/in-development-2d-ui-tool-for-unity-3/">here</a>.</p>
<p>First and foremost I just wanted to say thanks for all of the encouragement both on the blog and on Twitter, without it this would likely have become vaporware.</p>
<p>Well, after some holiday season radio silence I can proudly say that I will be releasing the tool for public beta early next week under the name QuadUI.</p>
<p><a href="http://blog.equals-equals.com/wp-content/uploads/2011/02/quadui-logo.jpg"><img class="aligncenter size-full wp-image-202" title="QuadUI" src="http://blog.equals-equals.com/wp-content/uploads/2011/02/quadui-logo.jpg" alt="" width="400" height="132" /></a></p>
<p>Here&#8217;s what you can expect to see:</p>
<ul>
<li>Scroll-able &amp; zoom-able (up to 4x) canvas.</li>
<li>Re-sizable grid with grid snapping.</li>
<li>Platform-independent, integrated framework.</li>
<li>Time.timeScale independent animations.</li>
</ul>
<p>Stay tuned over the next few days as I&#8217;ll post some videos and documentation in preparation for the beta release.</p>
<p>Until next time,</p>
<p><span style="color: #993366;">==</span></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.equals-equals.com/2011/02/01/introducing-quadui-for-unity-3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>In Development: 2D UI Tool for Unity 3</title>
		<link>http://blog.equals-equals.com/2010/11/27/in-development-2d-ui-tool-for-unity-3/</link>
		<comments>http://blog.equals-equals.com/2010/11/27/in-development-2d-ui-tool-for-unity-3/#comments</comments>
		<pubDate>Sat, 27 Nov 2010 17:30:46 +0000</pubDate>
		<dc:creator>equalsequals</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[GUI]]></category>
		<category><![CDATA[Quad UI]]></category>
		<category><![CDATA[Unity]]></category>
		<category><![CDATA[User Interface]]></category>

		<guid isPermaLink="false">http://blog.equals-equals.com/?p=86</guid>
		<description><![CDATA[[Edit 2-2-11] This project is now dubbed QuadUI. Read more here. In the 5 Unity games I have worked on so far, there has consistently been one job that has always been, in a best-case scenario, tedious. What I am talking about is 2D UI. The current implementation in Unity (3.1) is less than efficient <span class="ellipsis">&#8230;</span> <span class="more-link-wrap"><a href="http://blog.equals-equals.com/2010/11/27/in-development-2d-ui-tool-for-unity-3/" class="more-link"><span>Continue Reading</span></a></span>]]></description>
				<content:encoded><![CDATA[<p>[Edit 2-2-11] This project is now dubbed QuadUI. Read more <a href="http://blog.equals-equals.com/2011/02/01/introducing-quadui-for-unity-3/" target="_self">here</a>.</p>
<p><a href="http://blog.equals-equals.com/wp-content/uploads/2011/02/quadui-logo.jpg"><img class="aligncenter size-full wp-image-202" title="QuadUI" src="http://blog.equals-equals.com/wp-content/uploads/2011/02/quadui-logo.jpg" alt="" width="400" height="132" /></a></p>
<p>In the 5 Unity games I have worked on so far, there has consistently been one job that has always been, in a best-case scenario, tedious. What I am talking about is 2D UI. The current implementation in Unity (3.1) is less than efficient when doing the 2D elements of a game. Now, I love the ability to do immediate-mode GUI, but when developing for low-end hardware and mobile that isn&#8217;t really an option. So the other out-of-the-box option is to use GUITextures, which are not only bad for memory consumption and bandwidth, but eat up those ever-so-important draw calls on our mobile hardware.</p>
<p>A couple other issues with how things are currently:</p>
<ul>
<li>No draw call batching for 2D</li>
<li>Large memory bandwidth due to several uncompressed textures</li>
<li>No real editor for 2D built-in.</li>
</ul>
<p>Now there are some fantastic solutions out there for doing 2D in Unity, some of them free, some not so much. What I have seen (and used) though, are not very artist friendly, or very time-efficient for setup. I found myself punching in way too much data into 3rd party classes, which then generated my UI at runtime (On a mobile device that left me a marginal overhead around Awake and Start).</p>
<p><span id="more-86"></span></p>
<p>I was also forced into using programmatic animations and tweening classes (some of which were outdated by the time Unity 3 was released), which the artist half of me is never happy with. To make that side of me happy, I had to write custom adapter classes and hack my way around it just to use Unity&#8217;s Animation Tool. There went a few hours on top of all that data I was plugging in.</p>
<p>Also, if you&#8217;ve been working on games, you&#8217;ll know things change during development&#8230; all the time. So when things do, the last thing I want to do is go back and change values that were punched in inside of the Inspector, hit Play to test, then repeat because the numbers I punched in weren&#8217;t right. I want to open up the Scene, drag some stuff around, save, and then get on with my life.</p>
<p>The last problem I see is, though they work with Unity 3 just fine, they were designed during the 2.x feature set and take time doing things that 3.0 does automatically to boost performance, like batching.</p>
<p>So with that said, what I wanted was to create something that uses my favorite solutions for these 2D inefficiencies, and make it <strong>friendly for artists</strong>. What I came up with was a tool which allows the user to generate a 3D quad, textured from a custom imported UI texture atlas and place it directly into the scene to use Unity&#8217;s very awesome Editor the way it was intended.</p>
<p>Currently I have a rough feature set implemented and am testing as well as iterating on it inside of my current projects. This process insures that the product is suitable for a production environment because, well, I used it during the production of my games and it worked for me. I&#8217;d say in another week or so I should have a base alpha release for anyone wanting to try it out.</p>
<p>For now, here is a teaser video of it in action:</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="320" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/iYSdJfLZAhs?fs=1&amp;hl=en_US" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="480" height="320" src="http://www.youtube.com/v/iYSdJfLZAhs?fs=1&amp;hl=en_US" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>Now that you&#8217;ve seen what it is doing, I&#8217;ll take a minute to clarify exactly what I am trying to achieve.</p>
<p><strong>What this is:</strong></p>
<p>This is intended to speed up development of 2D UI in Unity&#8217;s Editor, without the need for 3rd party 3D Modeling software. It is meant to provide the same solution as other at-runtime orthographic quad solutions, but at authortime where all of Unity&#8217;s built-in Editor features can be used as intended.</p>
<p><strong>What this isn&#8217;t:</strong></p>
<p>I am not trying to reinvent the wheel. Unity&#8217;s Editor is fantastic for fast prototyping and iteration. I don&#8217;t want to, and will not build a Flash IDE-like interface when Unity already has all of the tools it needs. For instance, working in an orthographic environment with your Game view as a preview (like you saw in my video) is wysiwyg already. Unity&#8217;s Animation Tool, which is much like that of the animation tools in Flash (CS4+) and After Effects, can be easily applied to create fluid and light-weight animations for your UI. Bundle that with the built-in Animation Events and you can create awesome menus quickly and easily.</p>
<p>That being said, here&#8217;s some features I&#8217;m planning on implementing:</p>
<ul>
<li>Rulers</li>
<li>Zoom (for those big textures)</li>
<li>Bundled framework for making usable UI fast!</li>
<li>Built-in support for Time.timeScale independent UI animations. Animate even while paused.</li>
<li>Create Sprite Animations right from the Editor</li>
</ul>
<p>As I said before, I have used (parts of) this tool in games I have worked on. As I need to achieve different things, I will undoubtedly add to it to suit my needs.</p>
<p>Once it hits a level of quality I am comfortable with, I will be releasing it on the Unity Asset Store, free of charge of course.</p>
<p>&#8216;Til next time</p>
<p><span style="color: #99cc00;">==</span></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.equals-equals.com/2010/11/27/in-development-2d-ui-tool-for-unity-3/feed/</wfw:commentRss>
		<slash:comments>235</slash:comments>
		</item>
		<item>
		<title>Asset Bundles and the headache I found therein</title>
		<link>http://blog.equals-equals.com/2009/11/18/asset-bundles-and-the-headache-i-found-therein/</link>
		<comments>http://blog.equals-equals.com/2009/11/18/asset-bundles-and-the-headache-i-found-therein/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 04:12:41 +0000</pubDate>
		<dc:creator>equalsequals</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Unity]]></category>

		<guid isPermaLink="false">http://blog.equals-equals.com/?p=3</guid>
		<description><![CDATA[So the last little bit I have been working on a web game that is comprised of 11 different scenes (10 levels and a main menu). To make the game extremely lite-weight on initial load we decided to bundle the music for each level and each level themselves separately. This resulted in 21 separate asset <span class="ellipsis">&#8230;</span> <span class="more-link-wrap"><a href="http://blog.equals-equals.com/2009/11/18/asset-bundles-and-the-headache-i-found-therein/" class="more-link"><span>Continue Reading</span></a></span>]]></description>
				<content:encoded><![CDATA[<p>So the last little bit I have been working on a web game that is comprised of 11 different scenes (10 levels and a main menu).</p>
<p>To make the game extremely lite-weight on initial load we decided to bundle the music for each level and each level themselves separately. This resulted in 21 separate asset bundles. (2 bundles per level + the main menu&#8217;s bg music)</p>
<p>To make things simple for programming, a basic asset loader component was constructed and placed along side each scene&#8217;s main managing script. On initial load of main menu, the music is loaded in. The user will then be able to navigate around the main menu and eventually choose a level. Upon selecting a level, a bundle containing the level that was selected is loaded in and then the <strong>Application.LoadLevel(<em>&#8220;levelname&#8221;</em>)</strong> is called. This works, to an extent.</p>
<p>Continuously upon returning to a scene that was already visited once before I received this exception:</p>
<blockquote><p><span>The assetbundle &#8216;file_name_here.unity3d&#8217; can&#8217;t be loaded because another asset bundle with the same files are already loaded<br />
UnityEngine.WWW:get_assetBundle() </span></p></blockquote>
<p><span>Okay &#8211; so&#8230; I can&#8217;t load in this bundle because it&#8217;s already been loaded. That&#8217;s fine, I&#8217;ll just check if the bundle has been loaded before I load it. Sounds simple enough. &#8211; Famous last words.</span></p>
<p><span id="more-3"></span></p>
<p><span>It turns out that after scouring the docs, this is no way in the run-time API to check if an assetbundle of a certain type has been loaded already. I decided to take my case to the Unity community posting an inquisition for a solution, as well as notifying the Twitterverse with a link to my forum post. Within just a couple hours my post on the forums shot up to just shy of 80 views with not a single reply. Back to the think-tank I went.</span></p>
<p><span>After some thought, I decided to utilize <strong>PlayerPrefs </strong>to keep track if a bundle had been loaded. </span></p>
<p>In the real world situation I used a GameData class that serves as a gateway &#8211; but essentially the provided code below is the same thing without the filler -</p>
<p><span>When the loaded scene&#8217;s manager script calls <strong>Awake()</strong> it is logical to assume that the level&#8217;s bundle has been loaded. I make this call there:<br />
</span></p>
<p>[chsarp]</p>
<p><code>PlayerPrefs.SetInt("level"+(int)LEVELID+"loaded",1);</code></p>
<p>[/csharp]</p>
<p>Now checking is as simple as this:</p>
<p><code>[csharp]<br />
if(PlayerPrefs.GetInt("level"+(int)LEVELID+"loaded") == 0)<br />
{<br />
DoLoad();<br />
}<br />
else //already downloaded<br />
{<br />
Application.LoadLevel("LevelName");<br />
}</code></p>
<p>[/csharp]</p>
<p><span>There&#8217;s a final hole to fill here &#8211; and it actually is pretty easy to overlook. The thing about <strong>PlayerPrefs</strong> is that it is persistent data and therefor remains even after the application is closed. Since the asset bundles need to be reloaded each time the application is freshly started, we need to recursively move through and make sure that all the level&#8217;s corresponding PlayerPrefs properties are set back to 0 (false).</span></p>
<p>To do this, I use Time.time and check to make sure that the application is so young that the user couldn&#8217;t possibly have ran this same code twice by exiting and returning to the scene. So in the Main Menu&#8217;s manager script I used the <strong>Awake()</strong> method and ran this:</p>
<p><code>[csharp]<br />
if(Time.time &lt; 1)<br />
{<br />
//recursively set all the appropriate PlayerPrefs to 0<br />
}</code></p>
<p>[/csharp]</p>
<p>This ensures that it is only going to execute at the very beginning of the application.</p>
<p><span>In any case, that was my remedy for tackling this problem. Personally I feel that there should be something in the run-time API allowing me to detect this. I can only imagine how much of a headache it would be had I been doing something with more than 10 levels.</span></p>
<p><span>&#8217;til next time<br />
</span></p>
<p><span><strong><span style="color: #ff6600;">==</span></strong><br />
</span></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.equals-equals.com/2009/11/18/asset-bundles-and-the-headache-i-found-therein/feed/</wfw:commentRss>
		<slash:comments>2297</slash:comments>
		</item>
	</channel>
</rss>
