con.luyouhui.ceshi
extern "C" void btnAction()
{
NSLog(@"qqerqwe");
[[NSNotificationCenter defaultCenter]postNotificationName:@"关闭Window" object:nil];
}
//搜索ezarUnitySetGraphicsDevice然后替换添加下面代码
extern "C" void ezarUnitySetGraphicsDevice(void* device,int deviceType,int eventType);
extern "C" void ezarUnityRenderEvent(int marker);
-(void)shouldAttachRenderDelegate {
NSLog(@"测试测试测试");
UnityRegisterRenderingPlugin(&ezarUnitySetGraphicsDevice,&ezarUnityRenderEvent);
}
chmod -R 777 到工程目录处理错误
C Language Dialect为Compiler Default或者GNU99[-std=gnu99]。
Enable Objective-C Exceptions yes
C Language Dialect gnu999
全局搜索unitySplashStoryboard,注释掉
voidShowSplashScreen(UIWindow* window)
{
// bool hasStoryboard = [[NSBundle mainBundle] pathForResource: @"LaunchScreen" ofType: @"storyboardc"] != nullptr;
//
// if (hasStoryboard)
// {
// UIStoryboard *storyboard = [UIStoryboard storyboardWithName: @"LaunchScreen" bundle: [NSBundle mainBundle]];
// _controller = [storyboard instantiateViewControllerWithIdentifier: @"unitySplashStoryboard"];
// }
// else
_controller = [[SplashScreenController alloc] init];
_controller.view.backgroundColor = WhiteColor;
[_controllercreate: window];
[windowmakeKeyAndVisible];
}
Framework从原工程拖到新工程












网友评论