private void EndDemoLearn() { //黑屏效果 //找到场景中的Main Camera对象, GameObject mainCamera = GameObject.FindGameObjectWithTag("MainCamera"); if (mainCamera != null) { Tonemapping com = (Tonemapping)mainCamera.GetComponent("Tonemapping"); if (com != null) { com.enabled = true; com.SetActive(true); GameObject dfmUIRootGO = GameObject.FindGameObjectWithTag("UI"); if (dfmUIRootGO != null) { dfmUIRootGO.GetComponent <DFMUiRoot>().SetUIVisible(false); } StartCoroutine(WaitAndChangeScene(com.totalTime)); } } }