Download presentation
Presentation is loading. Please wait.
Published byDarleen Goodman Modified over 9 years ago
1
Get Your Cocoa On Integrating Objective-C into Unity iPhone Apps Brian Robbins President/Founder – Riptide Games brian@riptidegames.com Twitter: @dubane Slides & Source Code: www.dubane.com/cons/ Unity Unite – October 30, 2009
2
Overview Background Creating views Messaging Pros & Cons Q&A
3
Why? Use the best technology for what you need Feel like an iPhone app Access to any iPhone feature
4
Creating Views Demo
5
Creating Views Key code In ApplicationDidFinishLaunching //Get the application window UIWindow *topWindow = [[[UIApplication sharedApplication] windows] objectAtIndex: [[[UIApplication sharedApplication] windows] count]-1]; myParentView.center = topWindow.center;[topWindow addSubview:myParentView]; //Next create the MenuViewController menuVC = [[MenuViewController alloc] initWithNibName:@"MenuViewController" bundle:nil]; //Add it to the window so it can be active//Now we can add our Menu to the landscape View and it will appear [myParentView addSubview:menuVC.view];
6
Messaging Demo
7
Messaging Overview Poll NSUserDefaults for message from Unity Poll PlayerPrefs.GetString for message from Cocoa
8
Limitations Speed? One message per Unity update Text only, no binary
9
Pros Do anything you want on iPhone Feel like a native iPhone app Faster menu design & iteration Separate workload
10
Cons Extra work to test in Unity Limitations of message system Fragile vs future Unity updates
11
What is enabled Cocoa menus In App Purchase Video playback Different sound control OpenFeint, Plus+, etc. integration AdMob, etc. PinchMedia, Localytics, etc. Anything else you want!
12
Final Thoughts Pretty straightforward and lightweight Make menus & UI native iPhone Use Enhancement Pack http://technology.blurst.com/a-cocoa-based- frontend-for-unity-iphone-applications/
13
Q & A Brian Robbins President/Founder – Riptide Games brian@riptidegames.com Twitter: @dubane Slides & Source Code: www.dubane.com/cons/
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.