Нет описания
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

ButtonEditor.cs 872B

12345678910111213141516171819202122232425262728293031
  1. using UnityEngine.UI;
  2. namespace UnityEditor.UI
  3. {
  4. [CustomEditor(typeof(Button), true)]
  5. [CanEditMultipleObjects]
  6. /// <summary>
  7. /// Custom Editor for the Button Component.
  8. /// Extend this class to write a custom editor for a component derived from Button.
  9. /// </summary>
  10. public class ButtonEditor : SelectableEditor
  11. {
  12. SerializedProperty m_OnClickProperty;
  13. protected override void OnEnable()
  14. {
  15. base.OnEnable();
  16. m_OnClickProperty = serializedObject.FindProperty("m_OnClick");
  17. }
  18. public override void OnInspectorGUI()
  19. {
  20. base.OnInspectorGUI();
  21. EditorGUILayout.Space();
  22. serializedObject.Update();
  23. EditorGUILayout.PropertyField(m_OnClickProperty);
  24. serializedObject.ApplyModifiedProperties();
  25. }
  26. }
  27. }