hi,
1.在UnityAppController.h中添加以下两个方法
extern "C" void ezarUnitySetGraphicsDevice(void* device, int deviceType, int eventType);
extern "C" void ezarUnityRenderEvent(int marker);
2.在UnityAppController.mm中添加这两个方法
3.在UnityAppController.mm实现以下方法
- (void)shouldAttachRenderDelegate
{
UnityRegisterRenderingPlugin(&ezarUnitySetGraphicsDevice, &ezarUnityRenderEvent);
}
参考:http://www.jianshu.com/p/1afd619eda9e