private static Benchmarking GetInstance() { if (_applicationIsQuitting) { return(null); } if (_instance == null) { _instance = UnityEngine.Object.FindObjectOfType <Benchmarking>(); if (_instance == null) { GameObject gameObject = new GameObject("Benchmarking"); _instance = gameObject.AddComponent <Benchmarking>(); gameObject.hideFlags = HideFlags.HideAndDontSave; } UnityEngine.Object.DontDestroyOnLoad(_instance.gameObject); } return(_instance); }
static Benchmarking GetInstance() { if (_applicationIsQuitting) { return(null); } if (_instance == null) { _instance = FindObjectOfType <Benchmarking>(); if (_instance == null) { var gO = new GameObject("Benchmarking"); _instance = gO.AddComponent <Benchmarking>(); gO.hideFlags = HideFlags.HideAndDontSave; } DontDestroyOnLoad(_instance.gameObject); } return(_instance); }
public float StopTimer() { return(Benchmarking.StopTimer()); }
public void StartTimer(string context) { Benchmarking.StartTimer(context); }
public AsyncOperation LoadSceneAsync(string sceneName, LoadSceneMode mode) { return(Benchmarking.LoadSceneAsync(sceneName, mode)); }
public AsyncOperation LoadSceneAsync(int sceneBuildIndex, LoadSceneMode mode) { return(Benchmarking.LoadSceneAsync(sceneBuildIndex, mode)); }
public void LoadScene(string sceneName, LoadSceneMode mode) { Benchmarking.LoadScene(sceneName, mode); }
public void LoadScene(string sceneName) { Benchmarking.LoadScene(sceneName); }
public void LoadScene(int sceneBuildIndex, LoadSceneMode mode) { Benchmarking.LoadScene(sceneBuildIndex); }
public void EndExperiment() { Benchmarking.EndExperiment(); Benchmarking.Finished(); }
public void BeginExperiment(string experimentName) { Benchmarking.BeginExperiment(experimentName); }
/// <summary> /// Ends the experiment that collects estimated dropped frames as well /// as a histogram of miliseconds per frame. /// </summary> public void EndExperiment(string experimentName) { Benchmarking.EndExperiment(experimentName); Benchmarking.Finished(experimentName); }
public void ClearAllResults() { Benchmarking.Clear(); }
/// <summary> /// Stops all generic timers. /// </summary> public void StopAllTimers() { Benchmarking.StopAllTimers(); }
/// <summary> /// Stops the generic timer. /// </summary> /// <returns>The time elapsed in milliseconds.</returns> /// <param name="context">Context.</param> public float StopTimer(string context) { return(Benchmarking.StopTimer(context)); }