private void Awake() { if (_instance == null) { _instance = this; } }
public void Generate() { Working = true; _currentCreator?.CleanUp(); _currentCreator = GenerateNew(); _currentCreator.SetUp(); _stopwatch = Stopwatch.StartNew(); _currentCreator.Run(); MainThreadDispatch.Instance().Enqueue(() => { Working = false; }); StartCoroutine(FinishWork()); }
private void OnDestroy() { _instance = null; }