示例#1
0
 private void OnDisable()
 {
     if (passThroughSystem != null)
     {
         passThroughSystem.Stop();
     }
     loader            = null;
     passThroughSystem = null;
     cameraTexLeft     = null;
     cameraTexRight    = null;
 }
示例#2
0
 void OnEnable()
 {
     loader = XRGeneralSettings.Instance.Manager.activeLoader as PXR_Loader;
     if (loader == null)
     {
         Debug.LogError("Has no XR loader in the project!");
         return;
     }
     passThroughSystem = loader.GetLoadedSubsystem <PXR_PassThroughSystem>();
     if (passThroughSystem == null)
     {
         Debug.LogError("Has no XR Camera subsystem !");
         return;
     }
     passThroughSystem.Start();
 }