public override void OnInspectorGUI() { Init(); serializedObject.Update(); using (new EditorGUI.DisabledScope(true)) { EditorGUILayout.PropertyField(GetProperty("m_Script"), true); } var height = m_Helper.GetHeight(GetProperty, s_Label); var position = EditorGUILayout.GetControlRect(false, height); if (m_Helper.DoGUI(GetProperty, position, s_Label)) { serializedObject.ApplyModifiedProperties(); } }
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) { Init(property); label = EditorGUI.BeginProperty(position, label, property); if (m_Helper.DoGUI(GetProperty, position, label)) { property.serializedObject.ApplyModifiedProperties(); if (Application.isPlaying) { var input = property.GetObject() as InputBaseForEditor; input.Change(); } } EditorGUI.EndProperty(); }