public bool Init() { string sceneConfigPath = Application.dataPath + "/" + LightingData.constConfigPath; string scenePath = Application.dataPath + "/Res/Scene/"; Scene curScene = SceneManager.GetActiveScene(); if (curScene == null) { window.Close(); window = null; UnityEditor.EditorUtility.DisplayDialog("Title", "请先打开场景", "是"); return(false); } m_sceneName = curScene.name; lightSystem = new LightSystem(new LightingData(curScene.name, sceneConfigPath, SceneTools.getConfigPath(), scenePath)); recoverSystem = new LightRecoverSystem(new LightingData(curScene.name, sceneConfigPath, SceneTools.getConfigPath(), scenePath)); lightSystem.OnInit(); Lightmapping.completed = lightSystem.BakeOver; return(true); }