/// <summary>
 /// This method is called to draw the inspector GUI
 /// </summary>
 public virtual void OnInspectorGUI()
 {
     DrawDefaultInspector();
     if (m_EventInspectorData.Count > 0)
     {
         EventInspectorUtils.OnEventDrawerGUI(serializedObject, m_EventInspectorData);
     }
 }
        /// <summary>
        /// This method is called when the object is created. Called after Init.
        /// </summary>
        public virtual void OnEnable()
        {
            k_Fields.Clear();
            EventInspectorUtils.GetEvents(target.GetType(), k_Fields);
            foreach (var field in k_Fields)
            {
                m_EventInspectorData[field] = new EventInspectorData();
            }

            EventInspectorUtils.SyncEventDrawers(serializedObject, m_EventInspectorData);
            Undo.undoRedoPerformed += SyncEventDrawers;
            m_Parameters            = new List <SerializedPropertyData>();
            GetParameters();
            isDirty = false;

            foreach (var parameter in m_Parameters)
            {
                if (typeof(UnityEventBase).IsAssignableFrom(parameter.Type))
                {
                    parameter.AddAttribute(new HideInInspector());
                }
            }
        }
 void SyncEventDrawers()
 {
     EventInspectorUtils.SyncEventDrawers(serializedObject, m_EventInspectorData);
     Repaint();
 }