diff --git a/Classes/UnityAppController.mm b/Classes/UnityAppController.mm index cd7a9bf..e8233a6 100644 --- a/Classes/UnityAppController.mm +++ b/Classes/UnityAppController.mm @@ -39,6 +39,8 @@ #include #include +#import "AppDelegate.h" + // we assume that app delegate is never changed and we can cache it, instead of re-query UIApplication every time UnityAppController* _UnityAppController = nil; @@ -94,6 +96,8 @@ NSInteger _forceInterfaceOrientationMask = 0; @synthesize interfaceOrientation = _curOrientation; #endif +cocos2d::Application* app = nullptr; + - (id)init { if ((self = _UnityAppController = [super init])) @@ -255,6 +259,7 @@ extern "C" void UnityRequestQuit() if ([UIDevice currentDevice].generatesDeviceOrientationNotifications == NO) [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications]; #endif + app = new AppDelegate(1, 1); UnityInitApplicationNoGraphics([[[NSBundle mainBundle] bundlePath] UTF8String]); @@ -280,7 +285,7 @@ extern "C" void UnityRequestQuit() g.delaysTouchesBegan = false; } #endif - + app->start(); return YES; } diff --git a/Unity-iPhone.xcodeproj/project.pbxproj b/Unity-iPhone.xcodeproj/project.pbxproj index d51f6f3..addb8f6 100644 --- a/Unity-iPhone.xcodeproj/project.pbxproj +++ b/Unity-iPhone.xcodeproj/project.pbxproj @@ -474,7 +474,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - D5F2D102287C092D003C2B62 /* libcocos2d iOS.a in Frameworks */, D5F2CFD0287BF80A003C2B62 /* libz.tbd in Frameworks */, D5F2CFCE287BF7FE003C2B62 /* JavaScriptCore.framework in Frameworks */, D5F2CFCC287BF7ED003C2B62 /* libsqlite3.tbd in Frameworks */, @@ -500,6 +499,7 @@ 83B2574F0E63025400468741 /* libiconv.2.dylib in Frameworks */, D0DD4D8D8AC82F06A4331428 /* libil2cpp.a in Frameworks */, E9D340DABD2259166E8A82AF /* Metal.framework in Frameworks */, + D5F2D102287C092D003C2B62 /* libcocos2d iOS.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Unity-iPhone.xcodeproj/project.xcworkspace/xcuserdata/zhl.xcuserdatad/UserInterfaceState.xcuserstate b/Unity-iPhone.xcodeproj/project.xcworkspace/xcuserdata/zhl.xcuserdatad/UserInterfaceState.xcuserstate index dfe7936..d93518e 100644 Binary files a/Unity-iPhone.xcodeproj/project.xcworkspace/xcuserdata/zhl.xcuserdatad/UserInterfaceState.xcuserstate and b/Unity-iPhone.xcodeproj/project.xcworkspace/xcuserdata/zhl.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Unity-iPhone.xcodeproj/xcuserdata/zhl.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Unity-iPhone.xcodeproj/xcuserdata/zhl.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..179883a --- /dev/null +++ b/Unity-iPhone.xcodeproj/xcuserdata/zhl.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,24 @@ + + + + + + + + +