美文网首页
公司IOS项目集成到Unity项目中问题处理

公司IOS项目集成到Unity项目中问题处理

作者: 天狼鹰 | 来源:发表于2018-08-13 09:35 被阅读31次

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从原工程拖到新工程

相关文章

网友评论

      本文标题:公司IOS项目集成到Unity项目中问题处理

      本文链接:https://www.haomeiwen.com/subject/nllybftx.html