/// <summary> /// Register itsself with KGFAccessor /// -> do not override, use KGFAwake() instead /// </summary> protected virtual void Awake() { KGFAccessor.AddKGFObject(this); EventOnAwake.Trigger(this); // call own KGFAwake, so user is not able to change our own basic Awake() behaviour KGFAwake(); }
/// <summary> /// Un-Register itsself with KGFAccessor /// </summary> void OnDestroy() { EventOnDestroy.Trigger(this); KGFAccessor.RemoveKGFObject(this); KGFDestroy(); }