unity3dExtending the Editor


Syntax

  • [MenuItem(string itemName)]
  • [MenuItem(string itemName, bool isValidateFunction)]
  • [MenuItem(string itemName, bool isValidateFunction, int priority)]
  • [ContextMenu(string name)]
  • [ContextMenuItem(string name, string function)]
  • [DrawGizmo(GizmoType gizmo)]
  • [DrawGizmo(GizmoType gizmo, Type drawnGizmoType)]

Parameters

ParameterDetails
MenuCommandMenuCommand is used to extract the context for a MenuItem
MenuCommand.contextThe object that is the target of the menu command
MenuCommand.userDataAn int for passing custom information to a menu item