private void InspectorGUI()
        {
            if (m_drawer == null)
            {
                Enable();
            }
            var context    = target;
            var serialized = serializedObject;

            m_drawer.BeginOnGUI(context);
            if (!m_drawer.DrawSerializedFields(serialized, out var valueChanged))
            {
                EditorGUI.BeginChangeCheck();
                base.OnInspectorGUI();
                valueChanged = EditorGUI.EndChangeCheck();
            }

            m_drawer.DrawNonSerialized(valueChanged);
            if (valueChanged)
            {
                m_drawer.ManageValueChanged(serialized);
            }

            m_drawer.EndOnGUI(context);
        }
Exemplo n.º 2
0
        private void GUI()
        {
            if (m_drawer == null)
            {
                Enable();
            }

            m_drawer.BeginOnGUI(this);
            m_drawer.DrawNonSerialized(false);
            m_drawer.EndOnGUI(this);
        }
Exemplo n.º 3
0
        protected void InspectorGUI()
        {
            if (m_drawer == null && !Enable() || !m_drawer.HasMightyMembers)
            {
                base.OnInspectorGUI();
                return;
            }

            m_drawer.BeginOnGUI();
            m_drawer.ManageMembers(out var valueChanged);

            if (valueChanged)
            {
                serializedObject.ManageValueChanged();
                m_drawer.ApplyAutoValues();
                m_drawer.RefreshAllDrawers();
                serializedObject.ManageValueChanged();
            }

            m_drawer.EndOnGUI();
        }