- Home /
Can't be solved the way the asker wanted.
Adding to GameObject context menu WITHOUT [MenuItem(...)]
Hi there!
I'm trying to figure out how to add things to Unity's GameObject context menu in the hierarchy window. When you right click on an object, you get the little menu with Copy, Paste, and so on. The problem though is I want to add things to that menu NOT USING this code: [MenuItem ("GameObject/Test", false, 30)]
. I'm working on an editor script and I'm trying to figure out if I can dynamically add things (or remove) to this menu and I haven't found anything online on this yet. Any ideas?
Answer by hexagonius · Jul 20, 2018 at 07:45 AM
you can't do this without this attribute. you'll have to write code that rewrites or generates code using this attribute.
Ack, so be it. Hah, thanks for the answer! I guess I should close the question since there is no answer?
well, no :)
comments can be converted to one