Ejemplo n.º 1
0
 protected virtual void OnSceneLoaded(Scene loadedScene, LoadSceneMode loadMode)
 {
     if (loadedScene.name == sceneConstructor.name)
     {
         VRTK_SDKManager sdkManager = FindObjectOfType <VRTK_SDKManager>();
         sdkManager.gameObject.SetActive(false);
         sdkManager.scriptAliasLeftController  = leftScriptAlias;
         sdkManager.scriptAliasRightController = rightScriptAlias;
         sdkManager.gameObject.SetActive(true);
         ToggleScriptAlias(true);
         VRTK_SDKManager.ProcessDelayedToggleBehaviours();
         setupSwitcher = sdkManager.GetComponentInChildren <VRTK_SDKSetupSwitcher>();
     }
 }
Ejemplo n.º 2
0
 protected virtual void OnSceneLoaded(Scene loadedScene, LoadSceneMode loadMode)
 {
     if (IsConstructorScene(loadedScene))
     {
         VRTK_SDKManager sdkManager = FindObjectOfType <VRTK_SDKManager>();
         sdkManager.gameObject.SetActive(false);
         if (spawnPoint != null)
         {
             sdkManager.transform.position   = spawnPoint.transform.position;
             sdkManager.transform.rotation   = spawnPoint.transform.rotation;
             sdkManager.transform.localScale = spawnPoint.transform.localScale;
         }
         sdkManager.scriptAliasLeftController  = leftScriptAlias;
         sdkManager.scriptAliasRightController = rightScriptAlias;
         sdkManager.gameObject.SetActive(true);
         ToggleScriptAlias(true);
         VRTK_SDKManager.ProcessDelayedToggleBehaviours();
         setupSwitcher = sdkManager.GetComponentInChildren <VRTK_SDKSetupSwitcher>();
     }
 }