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);
        }
Ejemplo n.º 2
0
        private void GUI()
        {
            if (m_drawer == null)
            {
                Enable();
            }

            m_drawer.BeginOnGUI(this);
            m_drawer.DrawNonSerialized(false);
            m_drawer.EndOnGUI(this);
        }