Method for adding a new button to the context menu:
PhysicalObject.ContextMenuButtons.Add(new ContextMenuButton);
gameObject.GetComponent<PhysicalObject>().ContextMenuButtons.Add(new ContextMenuButton("Test button", () => { Debug.Log("Hello world!"); }));
Class:
ContextMenuButton(string newTitle, Action newAction);
ContextMenuButton button = new ContextMenuButton("Test button", () => { Debug.Log("Hello world!"); });
There was an error while loading. Please reload this page.