private void Awake() { if (_setAsActiveInstance) { ImpactManagerInstance.SetInstance(this); } Initialize(); }
private void OnDestroy() { //Dispose of any active continuous interactions for (int i = 0; i < activeContinuousInteractionResults.Length; i++) { IContinuousInteractionResult c = activeContinuousInteractionResults[i]; if (c != null) { c.Dispose(); } } //Clear the instance //This won't do anything if the active instance is not this ImpactManagerInstance.ClearInstance(this); }