//fixed update public virtual void SubscribeToFixedUpdate(System.Action _fixedUpdateCallback) { if (!fixedUpdateHandler) { fixedUpdateHandler = gameObject.AddComponent <FixedUpdateHandler>(); } fixedUpdateHandler.Subscribe(_fixedUpdateCallback); }
public virtual void SubscribeToFixedUpdate <T>(T _object, System.Action <T> _fixedUpdateCallback) where T : class { if (!fixedUpdateHandler) { fixedUpdateHandler = gameObject.AddComponent <FixedUpdateHandler>(); } T1ActionCache = arg => _fixedUpdateCallback(arg as T); fixedUpdateHandler.Subscribe(_object, T1ActionCache); }