private void Awake() { if (singleton != null) { Debug.LogWarning("Destroying old singleton!", singleton.gameObject); Object.Destroy(singleton); } singleton = this; exists = true; }
private void Awake() { if (InterpTimedEventSyncronizer.singleton) { Debug.LogWarning("Destroying old singleton!", InterpTimedEventSyncronizer.singleton.gameObject); UnityEngine.Object.Destroy(InterpTimedEventSyncronizer.singleton); } InterpTimedEventSyncronizer.singleton = this; InterpTimedEventSyncronizer.exists = true; }
private void Awake() { if (InterpTimedEventSyncronizer.singleton) { Debug.LogWarning("Destroying old singleton!", InterpTimedEventSyncronizer.singleton.gameObject); UnityEngine.Object.Destroy(InterpTimedEventSyncronizer.singleton); } InterpTimedEventSyncronizer.singleton = this; InterpTimedEventSyncronizer.exists = true; }
private void OnDestroy() { if (singleton == this) { try { InterpTimedEvent.Clear(false); } finally { singleton = null; exists = false; } } }
private void OnDestroy() { if (InterpTimedEventSyncronizer.singleton == this) { try { InterpTimedEvent.Clear(false); } finally { InterpTimedEventSyncronizer.singleton = null; InterpTimedEventSyncronizer.exists = false; } } }
private void OnDestroy() { if (InterpTimedEventSyncronizer.singleton == this) { try { InterpTimedEvent.Clear(false); } finally { InterpTimedEventSyncronizer.singleton = null; InterpTimedEventSyncronizer.exists = false; } } }