public void ChangeInteractiveScene(SenceInteractiveInfo toInteractiveScene, bool disableCurrentSceneMesh) { if (toInteractiveScene == currentActiveSenceInteractiveInfo) { return; } if (currentActiveSenceInteractiveInfo != null && disableCurrentSceneMesh) { if (currentActiveSenceInteractiveInfo.sceneType == SenceInteractiveInfo.SceneType.大场景) { if (currentActiveSenceInteractiveInfo.meshRoot != null) { currentActiveSenceInteractiveInfo.meshRoot.gameObject.SetActive(false); } } else { if (currentActiveSenceInteractiveInfo.huXingType.hxMeshRoot != null) { currentActiveSenceInteractiveInfo.huXingType.hxMeshRoot.gameObject.SetActive(false); } } } globalCameraCenter.ChangeCamera(toInteractiveScene.cameraUniversalCenter.cameras[0], 0.0f); if (toInteractiveScene.sceneType == SenceInteractiveInfo.SceneType.大场景) { if (toInteractiveScene.meshRoot != null) { toInteractiveScene.meshRoot.gameObject.SetActive(true); } mainSenceInteractiveInfo = toInteractiveScene; defaultGUI.DisplayDefaultGUI(); } else { if (toInteractiveScene.huXingType.hxMeshRoot != null) { toInteractiveScene.huXingType.hxMeshRoot.gameObject.SetActive(true); } } if (currentActiveSenceInteractiveInfo != null) { foreach (Canvas c in currentActiveSenceInteractiveInfo.GetComponentsInChildren <Canvas>(true)) { c.gameObject.SetActive(false); } } foreach (Canvas c in toInteractiveScene.GetComponentsInChildren <Canvas>(true)) { c.gameObject.SetActive(true); } currentActiveSenceInteractiveInfo = toInteractiveScene; globalCameraCenter.zbzOffset = toInteractiveScene.cameraUniversalCenter.zbzOffset; zbz.cameraUniversalCenter = toInteractiveScene.cameraUniversalCenter; }