public void AddCallback(Object target, System.Reflection.MethodInfo methodInfo) { var callback = new SerializableCallback(target, methodInfo); #if UNITY_EDITOR callback.constrainedDynamicArguementTypes = editorConstrainedDynamicArguementTypes; #endif if (_callbacks == null) { _callbacks = new List <SerializableCallback>(); } _callbacks.Add(callback); }
public object Clone() { var clone = new SerializableCallback(); clone._target = _target; clone._funcName = _funcName; clone._arguementMode = _arguementMode; clone._arguements = new List <SerializableArguement>(); clone._callState = _callState; if (_arguements != null) { foreach (var arg in _arguements) { clone._arguements.Add(arg.Clone() as SerializableArguement); } } return(clone); }