示例#1
0
    private IEnumerator ExperimentRuotine(PerfRecorder perfRecorder, string name)
    {
        yield return(new WaitForSeconds(3f));

        perfRecorder.BeginExperiment(name);
        yield return(new WaitForSeconds(3f));

        perfRecorder.EndExperiment();
    }
示例#2
0
 private static AutoTune GetInstance()
 {
     if (_instance == null)
     {
         _instance = UnityEngine.Object.FindObjectOfType <AutoTune>();
         if (_instance == null)
         {
             GameObject gameObject = new GameObject("AutoTune");
             _instance            = gameObject.AddComponent <AutoTune>();
             _prInstance          = gameObject.AddComponent <PerfRecorder>();
             gameObject.hideFlags = HideFlags.HideAndDontSave;
         }
         UnityEngine.Object.DontDestroyOnLoad(_instance.gameObject);
     }
     return(_instance);
 }
示例#3
0
 static AutoTune GetInstance()
 {
     if (_instance == null)
     {
         _instance = FindObjectOfType <AutoTune>();
         if (_instance == null)
         {
             var gO = new GameObject("AutoTune");
             _instance    = gO.AddComponent <AutoTune>();
             _prInstance  = gO.AddComponent <PerfRecorder>();
             gO.hideFlags = HideFlags.HideAndDontSave;
         }
         DontDestroyOnLoad(_instance.gameObject);
     }
     return(_instance);
 }