public override TaskStatus OnUpdate() { try { if (_Method == null) { _Method = CreateDelegate(); } return(_Method()); } catch (Exception e) { Debug.LogError(e); return(TaskStatus.Failure); } }
public override void OnFixedUpdate() { try { if (method == null) { method = (NoArgMethod)Delegate.CreateDelegate(typeof(NoArgMethod), sharedObject.Value, methodName); } method(); } catch (Exception e) { Debug.Log(e); } fixedUpdating = false; }