Example #1
0
 private void Update()
 {
     if (RestartingEmulator)
     {
         RestartingEmulator = false;
         Awake();
     }
     else if (RestartEmulator)
     {
         RestartEmulator = false;
         OnDestroy();
         RestartingEmulator = true;
     }
     if (ViewBothRealAndMirror)
     {
         LyumaAv3Runtime.updateSceneLayersDelegate(~0);
     }
     else if (ViewMirrorReflection && !ViewBothRealAndMirror)
     {
         LyumaAv3Runtime.updateSceneLayersDelegate(~(1 << 10));
     }
     else if (!ViewMirrorReflection && !ViewBothRealAndMirror)
     {
         LyumaAv3Runtime.updateSceneLayersDelegate(~(1 << 18));
     }
     if (EnableHeadScaling != lastHead)
     {
         lastHead = EnableHeadScaling;
         foreach (var runtime in runtimes)
         {
             runtime.EnableHeadScaling = EnableHeadScaling;
         }
     }
     if (lastLegacyMenuGUI != legacyMenuGUI)
     {
         lastLegacyMenuGUI = legacyMenuGUI;
         foreach (var runtime in runtimes)
         {
             runtime.legacyMenuGUI = legacyMenuGUI;
         }
     }
     if (CreateNonLocalClone)
     {
         CreateNonLocalCloneCount -= 1;
         if (CreateNonLocalCloneCount <= 0)
         {
             CreateNonLocalClone = false;
         }
         foreach (var runtime in runtimes)
         {
             if (runtime.AvatarSyncSource == runtime)
             {
                 runtime.CreateNonLocalClone = true;
             }
         }
     }
 }
Example #2
0
 private void OnDestroy()
 {
     foreach (var runtime in runtimes)
     {
         Destroy(runtime);
     }
     runtimes.Clear();
     LyumaAv3Runtime.updateSceneLayersDelegate(~0);
 }