static public void ViewScene(DialogPartData data) { // TODO... #if false ViNoSceneManager sm = GameObject.FindObjectOfType(typeof(ViNoSceneManager)) as ViNoSceneManager; if (sm != null) { GameObject advSceneRoot = sm.theSavedPanel; if (data.isClearScene) { bool destroyImmediate = true; ClearSceneNode.Do(advSceneRoot, destroyImmediate); } // if( data.isLoadScene && data.Scene != null ){ if (!string.IsNullOrEmpty(data.sceneFilePath) && sm != null) { bool TODO1 = false; bool TODO2 = false; Scene scene = Resources.Load(data.sceneFilePath, typeof(Scene)) as Scene; // LoadSceneNode.Do( advSceneRoot , data.Scene , TODO1 , TODO2 , true ); LoadSceneNode.Do(advSceneRoot, scene, TODO1, TODO2, true); } } // No need to warning , if user do not need Scene Save and Load function. // else{ // Debug.LogWarning( "There is no ViNoSceneManager object. Scene Save and Load will not work..." ); // } #endif }
static public void Do(GameObject advSceneRoot, Object scrSceneDataResource, bool destroy, bool destroyImmediate, bool fadeIn) { #if true if (destroy) { ClearSceneNode.Do(advSceneRoot, destroyImmediate); } #endif Scene sceneData = scrSceneDataResource as Scene; if (sceneData != null) { SceneCreator.CreateScene(sceneData, fadeIn); } else { Debug.LogError("resource cast error ! Not Scene."); } }