Adds the function to the context menu of the component.
@ContextMenu ("Do Something") function DoSomething () { Debug.Log ("Perform operation"); }
// C# example: class ContextTesting : MonoBehaviour { /// Add a context menu named "Do Something" in the inspector /// of the attached script. [ContextMenu ("Do Something")] void DoSomething () { Debug.Log ("Perform operation"); } }