/************************************************************************************************************************/ /// <summary>Stores the details of the specified event.</summary> public static void CopyEvent(UltEventBase e) { var eventType = e.GetType(); if (_Event == null || _Event.GetType() != eventType) { _Event = (UltEventBase)Activator.CreateInstance(eventType); } _Event.CopyFrom(e); }
/************************************************************************************************************************/ private void DoDynamicListenerGUI(float x, float y, float width, UltEventBase targetEvent) { x += IndentSize; width -= IndentSize * 2; var area = new Rect(x, y, width, EditorGUIUtility.singleLineHeight); var calls = targetEvent.GetDynamicCallInvocationList(); for (int i = 0; i < calls.Length; i++) { var call = calls[i]; DoDelegateGUI(area, call); area.y += area.height; } }
/************************************************************************************************************************/ /// <summary>Overwrites the specified event with the previously copied details.</summary> public static void Paste(UltEventBase e) { e.CopyFrom(_Event); }