//------------------------------------------------------------------------------------------------------------- public static void ReplaceAllByScenes(STSScene sNextActiveScene, STSScene[] sScenesToAdd, STSScene sIntermissionScene, STSTransitionData sTransitionData = null, bool sAllowCyclic = false) { List <string> tScenesToAdd = new List <string>(); if (sScenesToAdd != null) { foreach (STSScene tScene in sScenesToAdd) { tScenesToAdd.Add(tScene.GetSceneShortName()); } } string tNextActiveScene = string.Empty; if (sNextActiveScene != null) { tNextActiveScene = sNextActiveScene.GetSceneShortName(); } string tIntermissionScene = string.Empty; if (sIntermissionScene != null) { tIntermissionScene = sIntermissionScene.GetSceneShortName(); } ReplaceAllByScenes(tNextActiveScene, tScenesToAdd, tIntermissionScene, sTransitionData, sAllowCyclic); }
//------------------------------------------------------------------------------------------------------------- private void Start() { //Debug.Log("<color=red>START</color>"); if (OriginalScene == null) { OriginalScene = new STSScene(); Scene tScene = SceneManager.GetActiveScene(); if (tScene.path != null) { OriginalScene.ScenePath = tScene.path; } } }
//------------------------------------------------------------------------------------------------------------- private STSScenesPackage INTERNAL_GetDefaultScenesPackage() { if (DefaultScenesPackage == null) { if (OriginalScene == null) { OriginalScene = new STSScene(); Scene tScene = SceneManager.GetActiveScene(); if (tScene.path != null) { OriginalScene.ScenePath = tScene.path; } } DefaultScenesPackage = new STSScenesPackage(OriginalScene.GetSceneShortName(), null, null, null); } return(DefaultScenesPackage); }