<?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: A Cocoa-Based Frontend For Unity iPhone Applications</title>
	<atom:link href="http://technology.blurst.com/a-cocoa-based-frontend-for-unity-iphone-applications/feed/" rel="self" type="application/rss+xml" />
	<link>http://technology.blurst.com/a-cocoa-based-frontend-for-unity-iphone-applications/</link>
	<description>Tips, tricks, and tutorials from Flashbang&#039;s Unity development experience.</description>
	<lastBuildDate>Mon, 16 May 2011 07:22:11 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.3</generator>
	<item>
		<title>By: Rebecca</title>
		<link>http://technology.blurst.com/a-cocoa-based-frontend-for-unity-iphone-applications/#comment-332</link>
		<dc:creator>Rebecca</dc:creator>
		<pubDate>Mon, 06 Dec 2010 14:03:11 +0000</pubDate>
		<guid isPermaLink="false">http://technology.blurst.com/?p=103#comment-332</guid>
		<description>Thank you very much for this tutorial, it was very helpful.  I am still trying to add a subview to Unity&#039;s UIWindow in landscape mode (ie. a bottom navigation bar created using Interface Builder)  I know this is possible because the Rolls Royce Phantom application has both components working together in landscape mode.  If anyone has any suggestions I would greatly appreciate it.</description>
		<content:encoded><![CDATA[<p>Thank you very much for this tutorial, it was very helpful.  I am still trying to add a subview to Unity&#8217;s UIWindow in landscape mode (ie. a bottom navigation bar created using Interface Builder)  I know this is possible because the Rolls Royce Phantom application has both components working together in landscape mode.  If anyone has any suggestions I would greatly appreciate it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yann</title>
		<link>http://technology.blurst.com/a-cocoa-based-frontend-for-unity-iphone-applications/#comment-305</link>
		<dc:creator>Yann</dc:creator>
		<pubDate>Fri, 20 Aug 2010 02:38:47 +0000</pubDate>
		<guid isPermaLink="false">http://technology.blurst.com/?p=103#comment-305</guid>
		<description>Hi,

First of all : Thanks a lot ! All this is very interesting and will be very useful...
once I get it to work properly :-/

Actually I managed to build a project using the provided sources.
It starts nicely on cocoa and switch to unity without any problem. But when I&#039;m trying to get back to cocoa something isn&#039;t working. 

If fact the FBFrontendController receive the signal and launchFrontend is called but it looks like it can&#039;t find the Unity EAGLview. The widow subview count return 0 and the for loop is never played. So I can&#039;t hide the Unity view.

NSLog(@&quot;%d&quot;,window.subviews);
	
	for(UIView * v in window.subviews)
	{
		NSLog(@&quot;for&quot;);

After the loop I try to set up a UIView :

SceneTitle  * newSceneTitle= [[SceneTitle alloc] init];
[window addSubview:[newSceneTitle view]];
[window bringSubviewToFront:[newSceneTitle view]];

But nothing shoes up :-(
Any ideas ?

I&#039;m using Unity 1.7 Basic and compile against iOS 3.2.

Cheers !</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>First of all : Thanks a lot ! All this is very interesting and will be very useful&#8230;<br />
once I get it to work properly :-/</p>
<p>Actually I managed to build a project using the provided sources.<br />
It starts nicely on cocoa and switch to unity without any problem. But when I&#8217;m trying to get back to cocoa something isn&#8217;t working. </p>
<p>If fact the FBFrontendController receive the signal and launchFrontend is called but it looks like it can&#8217;t find the Unity EAGLview. The widow subview count return 0 and the for loop is never played. So I can&#8217;t hide the Unity view.</p>
<p>NSLog(@&#8221;%d&#8221;,window.subviews);</p>
<p>	for(UIView * v in window.subviews)<br />
	{<br />
		NSLog(@&#8221;for&#8221;);</p>
<p>After the loop I try to set up a UIView :</p>
<p>SceneTitle  * newSceneTitle= [[SceneTitle alloc] init];<br />
[window addSubview:[newSceneTitle view]];<br />
[window bringSubviewToFront:[newSceneTitle view]];</p>
<p>But nothing shoes up <img src='http://technology.blurst.com/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /><br />
Any ideas ?</p>
<p>I&#8217;m using Unity 1.7 Basic and compile against iOS 3.2.</p>
<p>Cheers !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ecurtz</title>
		<link>http://technology.blurst.com/a-cocoa-based-frontend-for-unity-iphone-applications/#comment-304</link>
		<dc:creator>ecurtz</dc:creator>
		<pubDate>Wed, 18 Aug 2010 15:59:17 +0000</pubDate>
		<guid isPermaLink="false">http://technology.blurst.com/?p=103#comment-304</guid>
		<description>Late reply here, I just started working on this stuff and have been using the uprise78 posted on the forum.

I was able to switch back and forth between UIWindows using [window makeKeyAndVisible] without any issues. I originally tried this as a hack to fix autorotate on my UIKit views.</description>
		<content:encoded><![CDATA[<p>Late reply here, I just started working on this stuff and have been using the uprise78 posted on the forum.</p>
<p>I was able to switch back and forth between UIWindows using [window makeKeyAndVisible] without any issues. I originally tried this as a hack to fix autorotate on my UIKit views.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Donna</title>
		<link>http://technology.blurst.com/a-cocoa-based-frontend-for-unity-iphone-applications/#comment-265</link>
		<dc:creator>Donna</dc:creator>
		<pubDate>Wed, 10 Mar 2010 01:12:23 +0000</pubDate>
		<guid isPermaLink="false">http://technology.blurst.com/?p=103#comment-265</guid>
		<description>Fra, I am having the exact same issue. Except that I have my application configured as a landscape, and when i come back my menus are portrait. I suspect the Unity EAGLView, but I have no clue how to overcome this issue. Any help would be greatly  appreciated from anyone who&#039;s been successful with their menus in XCode</description>
		<content:encoded><![CDATA[<p>Fra, I am having the exact same issue. Except that I have my application configured as a landscape, and when i come back my menus are portrait. I suspect the Unity EAGLView, but I have no clue how to overcome this issue. Any help would be greatly  appreciated from anyone who&#8217;s been successful with their menus in XCode</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fra</title>
		<link>http://technology.blurst.com/a-cocoa-based-frontend-for-unity-iphone-applications/#comment-225</link>
		<dc:creator>Fra</dc:creator>
		<pubDate>Sun, 17 Jan 2010 08:57:17 +0000</pubDate>
		<guid isPermaLink="false">http://technology.blurst.com/?p=103#comment-225</guid>
		<description>Thanks for sharing. The approach is working smoothly, the only problem is that when I&#039;m back to cocoa from unity and I move the device orientation an animation that tries to rotate the device in landscape view is showing up. 

My application is configured in portrait in info.plist and View Controllers are all returning NO to shouldAutorotateToInterfaceOrientation.

Did you experience a similar issue or have any idea if the EAGLView could be the cause of the problem ?</description>
		<content:encoded><![CDATA[<p>Thanks for sharing. The approach is working smoothly, the only problem is that when I&#8217;m back to cocoa from unity and I move the device orientation an animation that tries to rotate the device in landscape view is showing up. </p>
<p>My application is configured in portrait in info.plist and View Controllers are all returning NO to shouldAutorotateToInterfaceOrientation.</p>
<p>Did you experience a similar issue or have any idea if the EAGLView could be the cause of the problem ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt</title>
		<link>http://technology.blurst.com/a-cocoa-based-frontend-for-unity-iphone-applications/#comment-104</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Thu, 04 Jun 2009 17:17:51 +0000</pubDate>
		<guid isPermaLink="false">http://technology.blurst.com/?p=103#comment-104</guid>
		<description>@bill
Right now the only way to pass a value from Cocoa to Unity is through PlayerPrefs/NSUserDefaults. FBPlayerPrefs file is a wrapper for NSUserDefaults to make it behave like PlayerPrefs in Unity. So you can do like:

[FBPlayerPrefs setInt:15 withKey:@“number_of_bunnies”]

Then within Unity, you would do like:

var numberOfBunnies:int = PlayerPrefs.GetInt(&quot;number_of_bunnies&quot;, 0);</description>
		<content:encoded><![CDATA[<p>@bill<br />
Right now the only way to pass a value from Cocoa to Unity is through PlayerPrefs/NSUserDefaults. FBPlayerPrefs file is a wrapper for NSUserDefaults to make it behave like PlayerPrefs in Unity. So you can do like:</p>
<p>[FBPlayerPrefs setInt:15 withKey:@“number_of_bunnies”]</p>
<p>Then within Unity, you would do like:</p>
<p>var numberOfBunnies:int = PlayerPrefs.GetInt(&#8220;number_of_bunnies&#8221;, 0);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bill</title>
		<link>http://technology.blurst.com/a-cocoa-based-frontend-for-unity-iphone-applications/#comment-102</link>
		<dc:creator>bill</dc:creator>
		<pubDate>Wed, 03 Jun 2009 21:48:46 +0000</pubDate>
		<guid isPermaLink="false">http://technology.blurst.com/?p=103#comment-102</guid>
		<description>I just have a question ?How do I pass value from frontend to unity ?
When I type something to the form,how can I pass the string to unity and actually show the string on the unity view?Hope to get any of answers</description>
		<content:encoded><![CDATA[<p>I just have a question ?How do I pass value from frontend to unity ?<br />
When I type something to the form,how can I pass the string to unity and actually show the string on the unity view?Hope to get any of answers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy</title>
		<link>http://technology.blurst.com/a-cocoa-based-frontend-for-unity-iphone-applications/#comment-71</link>
		<dc:creator>Andy</dc:creator>
		<pubDate>Mon, 23 Feb 2009 15:18:35 +0000</pubDate>
		<guid isPermaLink="false">http://technology.blurst.com/?p=103#comment-71</guid>
		<description>@Matt - Thanks for the info. It turns out that the window i was getting back from unityController-&gt;_window was nil - which is why my content wasn&#039;t being added above the unity content.  It seems there is a global var in the AppController called _window, which is where the EAGLView is added.  The local _window was never being instantiated.  I deleted that reference altogether, and just added a function to return the global _window, and everything worked perfectly.  I&#039;m not sure if i have a wrong version or something - i&#039;m not sure what has changed from when you wrote the code to when i tried to implement :)

Thanks for the great work - it has helped a lot.</description>
		<content:encoded><![CDATA[<p>@Matt &#8211; Thanks for the info. It turns out that the window i was getting back from unityController-&gt;_window was nil &#8211; which is why my content wasn&#8217;t being added above the unity content.  It seems there is a global var in the AppController called _window, which is where the EAGLView is added.  The local _window was never being instantiated.  I deleted that reference altogether, and just added a function to return the global _window, and everything worked perfectly.  I&#8217;m not sure if i have a wrong version or something &#8211; i&#8217;m not sure what has changed from when you wrote the code to when i tried to implement <img src='http://technology.blurst.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Thanks for the great work &#8211; it has helped a lot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Mechtley</title>
		<link>http://technology.blurst.com/a-cocoa-based-frontend-for-unity-iphone-applications/#comment-66</link>
		<dc:creator>Matt Mechtley</dc:creator>
		<pubDate>Wed, 18 Feb 2009 20:58:03 +0000</pubDate>
		<guid isPermaLink="false">http://technology.blurst.com/?p=103#comment-66</guid>
		<description>@Andy: Despite being able to technically create multiple windows in code, the iPhone really only lets you use one at a time. I ran into this problem myself, which is why the launchUnity: method has the line:
window = unityController-&gt;_window;
to reassign the local window pointer to the window that Unity creates.

Once a second window has been created, I couldn&#039;t find any way to get the original window to return to the front, so it&#039;s best to just treat it as though it&#039;s gone forever.

As for getting created views to add above the Unity content, by default subviews will always be added to the top of their superview/window. However, I&#039;m not sure how well these play with the OpenGL EAGLView. That&#039;s why I set the Unity EAGLView to hidden in the launchFrontend: method.</description>
		<content:encoded><![CDATA[<p>@Andy: Despite being able to technically create multiple windows in code, the iPhone really only lets you use one at a time. I ran into this problem myself, which is why the launchUnity: method has the line:<br />
window = unityController->_window;<br />
to reassign the local window pointer to the window that Unity creates.</p>
<p>Once a second window has been created, I couldn&#8217;t find any way to get the original window to return to the front, so it&#8217;s best to just treat it as though it&#8217;s gone forever.</p>
<p>As for getting created views to add above the Unity content, by default subviews will always be added to the top of their superview/window. However, I&#8217;m not sure how well these play with the OpenGL EAGLView. That&#8217;s why I set the Unity EAGLView to hidden in the launchFrontend: method.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy</title>
		<link>http://technology.blurst.com/a-cocoa-based-frontend-for-unity-iphone-applications/#comment-61</link>
		<dc:creator>Andy</dc:creator>
		<pubDate>Fri, 06 Feb 2009 16:50:11 +0000</pubDate>
		<guid isPermaLink="false">http://technology.blurst.com/?p=103#comment-61</guid>
		<description>Hey - This is a great technique.  I&#039;m just getting into iPhone dev and this was just what i needed.  When i try to use it, however, i can&#039;t get subviews to be added above my unity content (nor is the unity subview ever found on the window).  I have to create a new window above the content instead.  Would you happen to know of any reason this might be the case?</description>
		<content:encoded><![CDATA[<p>Hey &#8211; This is a great technique.  I&#8217;m just getting into iPhone dev and this was just what i needed.  When i try to use it, however, i can&#8217;t get subviews to be added above my unity content (nor is the unity subview ever found on the window).  I have to create a new window above the content instead.  Would you happen to know of any reason this might be the case?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

