private void OnApplicationQuit() { if (stopLoaderOnAppExit && loader != null) { loader.Stop(); } }
// private bool hasVRIK = false; protected override void Awake() { this.isPlay = HumanNaviConfig.Instance.configInfo.playbackType == WorldPlaybackCommon.PlaybackTypePlay; base.Awake(); HumanNaviPlaybackCommon common = this.GetComponent <HumanNaviPlaybackCommon>(); if (this.isPlay) { Transform robot = common.robot.transform; //robot.Find("CompetitionScripts").gameObject.SetActive(false); robot.Find("RosBridgeScripts").gameObject.SetActive(false); Transform moderator = GameObject.FindGameObjectWithTag("Moderator").transform; moderator.GetComponent <HumanNaviModerator>().enabled = false; moderator.GetComponent <HumanNaviPubMessage>().enabled = false; moderator.GetComponent <HumanNaviSubMessage>().enabled = false; moderator.GetComponent <HumanNaviPubTaskInfo>().enabled = false; moderator.GetComponent <HumanNaviPubAvatarStatus>().enabled = false; moderator.GetComponent <HumanNaviPubObjectStatus>().enabled = false; robot.GetComponentInChildren <HumanNaviSubGuidanceMessage>().enabled = false; this.scoreManager.enabled = false; // Avatar Transform avatar = GameObject.FindGameObjectWithTag("Avatar").transform; avatar.GetComponentInChildren <Valve.VR.InteractionSystem.Player>().enabled = false; #if ENABLE_VRIK // Avatar (Final IK) if (avatar.GetComponentInChildren <RootMotion.FinalIK.VRIK>()) { this.hasVRIK = true; } if (this.hasVRIK) { avatar.transform.Find("ThirdPersonEthanWithAnimation").gameObject.SetActive(false); avatar.GetComponentInChildren <RootMotion.FinalIK.VRIK>().enabled = false; } #endif // if (!this.hasVRIK) { foreach (SteamVR_Behaviour_Pose pose in avatar.GetComponentsInChildren <SteamVR_Behaviour_Pose>()) { pose.enabled = false; } foreach (Hand hand in avatar.GetComponentsInChildren <Hand>()) { hand.enabled = false; } avatar.GetComponentInChildren <SteamVR_CameraHelper>().enabled = false; avatar.GetComponentInChildren <TrackedPoseDriver>().enabled = false; XRLoader activeLoader = XRGeneralSettings.Instance.Manager.activeLoader; if (activeLoader != null) { activeLoader.Stop(); XRGeneralSettings.Instance.Manager.DeinitializeLoader(); } avatar.GetComponentInChildren <Animator>().enabled = false; avatar.GetComponentInChildren <SIGVerse.Human.VR.SimpleHumanVRController>().enabled = false; avatar.GetComponentInChildren <SIGVerse.Human.IK.SimpleIK>().enabled = false; avatar.GetComponentInChildren <Animator>().enabled = false; avatar.GetComponentInChildren <SIGVerse.Human.VR.SimpleHumanVRController>().enabled = false; avatar.GetComponentInChildren <SIGVerse.Human.IK.SimpleIK>().enabled = false; } //UnityEngine.XR.XRSettings.enabled = false; this.timeLimit = HumanNaviConfig.Instance.configInfo.sessionTimeLimit; } }