Exemple #1
0
 public void Start()
 {
     if (UnityARSessionNativeInterface.IsARKitRemoteServer())
     {
         UnityARSessionNativeInterface.ARFrameUpdatedEvent += UpdateFrame;
     }
     bCommandBufferInitialized = false;
 }
Exemple #2
0
        void OnDestroy()
        {
            if (m_VideoCommandBuffer != null)
            {
                GetComponent <Camera>().RemoveCommandBuffer(CameraEvent.BeforeForwardOpaque, m_VideoCommandBuffer);
            }

            if (UnityARSessionNativeInterface.IsARKitRemoteServer())
            {
                UnityARSessionNativeInterface.ARFrameUpdatedEvent -= UpdateFrame;
            }
            bCommandBufferInitialized = false;

            if (_videoTextureY)
            {
                Destroy(_videoTextureY);
            }
            if (_videoTextureCbCr)
            {
                Destroy(_videoTextureCbCr);
            }
        }