コード例 #1
0
 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));
 }
コード例 #2
0
    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());
        }
    }
コード例 #3
0
 protected virtual void Awake()
 {
     replayData = (ReplayDataScriptable)Resources.Load("ReplayData", typeof(ReplayDataScriptable));
 }