コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }