private void OnDestroy() { if (_current == this) { _current = null; } }
void Awake() { if (_current == null) { _current = this; } }
private void OnDestroy() { if (RadicalRoutineHelper._current == this) { RadicalRoutineHelper._current = null; } }
public void Run(string methodName, object target) { this.Method = methodName; this.Target = target; if (this.trackedObject != null) { RadicalRoutineHelper radicalRoutineHelper = this.trackedObject.GetComponent <RadicalRoutineHelper>() ?? this.trackedObject.gameObject.AddComponent <RadicalRoutineHelper>(); radicalRoutineHelper.Run(this); } else { RadicalRoutineHelper.Current.Run(this); } }
void OnDestroy() { if(_current == this) _current = null; }