private void OnEnable() { //Get the assets needed from the resource folder debugLinePrefab = (GameObject)Resources.Load("DebugLine", typeof(GameObject)); cameraPrefab = (GameObject)Resources.Load("DebugLineCamera", typeof(GameObject)); replayData = (ReplayDataScriptable)Resources.Load("ReplayData", typeof(ReplayDataScriptable)); }
private void Awake() { JsonPath = Directory.CreateDirectory(Application.dataPath + "/DebugStats/" + SceneManager.GetActiveScene().name + "/").FullName; JsonPrefix = "_" + SceneManager.GetActiveScene().name + "_" + Random.Range(0, 10000000) + "_debugStats.json"; //If replaying a saved data, turn off capture replayData = (ReplayDataScriptable)Resources.Load("ReplayData", typeof(ReplayDataScriptable)); if (replayData.RunReplay == true) { captureData = false; } //If capturing is on, gather data for the json file if (captureData == true) { StartCoroutine(AddDataTimer()); } }
protected virtual void Awake() { replayData = (ReplayDataScriptable)Resources.Load("ReplayData", typeof(ReplayDataScriptable)); }