public void Generate() { Working = true; _currentCreator?.CleanUp(); _currentCreator = GenerateNew(); _currentCreator.SetUp(); _stopwatch = Stopwatch.StartNew(); _currentCreator.Run(); MainThreadDispatch.Instance().Enqueue(() => { Working = false; }); StartCoroutine(FinishWork()); }
protected override IEnumerator MainWork(bool firstRun = false, bool measure = true) { TerrainCreator.SetUp(); if (measure) { using (Measure.Scope(new SampleGroupDefinition( Common.DefinitionName(TerrainCreator.GetType().Name, firstRun ? Common.FirstKeyWord : string.Empty), TestSettings.SampleUnit))) { TerrainCreator.Run(); } } else { TerrainCreator.Run(); } yield return(null); TerrainCreator.CleanUp(); }
private void RunStatement() { TerrainCreator.Run(); }
private IEnumerator RunStatement() { TerrainCreator.Run(); MainThreadDispatch.Instance().Enqueue(() => { _working = false; }); yield return(new WaitWhile(() => _working)); }
public void Run() { Working = true; _currentCreator?.Run(); Working = false; }