// Update is called once per frame void Update() { if (updateScreenOrientation()) { // also update size/orientation of metaio SDK and camera projection // matrix MetaioSDKUnity.resizeRenderer(Screen.width, Screen.height); MetaioSDKUnity.updateScreenOrientation(screenOrientation); metaioCamera.updateCameraProjectionMatrix(); } // Try to create the texture (must call every frame in case required size changes) textureCreated = createTexture(0); if (textureCreated) { updateCameraPlaneScale(); } // TODO: GL.IssuePluginEvent should be used on all platforms, // but in Unity 3.5.x, the callbacks in the native plugin are // never called. Check if they work in Unity 4.x. #if UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX || UNITY_EDITOR GL.IssuePluginEvent(textureID); #elif UNITY_ANDROID || UNITY_IPHONE MetaioSDKUnity.UnityRenderEvent(textureID); #endif }
// Update is called once per frame void Update() { if (updateScreenOrientation()) { // also update size/orientation of metaio SDK and camera projection // matrix MetaioSDKUnity.resizeRenderer(Screen.width, Screen.height); MetaioSDKUnity.updateScreenOrientation(screenOrientation); metaioCamera.updateCameraProjectionMatrix(); } // Try to create the texture (must call every frame in case required size changes) textureCreated = createTexture(0); if (textureCreated) { updateCameraPlaneScale(); } }