private void OnDestroy() { if (SaveMaster.DeactivatedObjectExplicitly(this.gameObject)) { if (removeData) { SaveMaster.WipeSaveable(saveable); instanceManager.DestroyObject(this, saveable); } } }
private void WipeSaveables() { var stopWatch = new System.Diagnostics.Stopwatch(); stopWatch.Start(); int saveableCount = saveables.Length; for (int i = 0; i < saveableCount; i++) { SaveMaster.WipeSaveable(saveables[i]); } stopWatch.Stop(); displayText.text = stopWatch.Elapsed.TotalMilliseconds.ToString(); lastestSpeed = stopWatch.ElapsedMilliseconds; }