2using System.Collections;
21 [HideInInspector] [SerializeField]
private string json =
null;
28 string san = pb_FileUtility.SanitizePath(path,
".json");
30 if(!pb_FileUtility.IsValidPath(san,
".json"))
32 Debug.LogWarning(san +
" not found, or file is not a JSON scene.");
37 instance.json = pb_FileUtility.ReadFile(san);
40 SceneManager.LoadScene(
instance.sceneToLoadLevelInto);
43 private void OnLevelWasLoaded(
int i)
override bool dontDestroyOnLoad
Make this object persistent between scene loads.
string sceneToLoadLevelInto
The scene that will be opened and loaded into.
static void LoadScene(string path)
static void LoadLevel(string levelJson, bool ssol=false)