Hello,
We are working on the portage of our internal library inside Unity, and we have to create dynamically MenuItem.
We know how create MenuItem from the attribute [MenuItem("MyMenuName/MyItem"] attached to a static void function, but what we want is to instantiate it from an XML file:
…
…
Is there a way to do this?
Thank you for your help
As far as I know, it's not possible to load a MenuItem any other way. The way Unity does it is to look for the attribute, then add straight to the menu - after that, there's no way to add any other ones manually
If you're using C# this is actually relatively simple. You can include the System.XML namespace and use it to load your XML. I recommend using the Resources folder to house your XML as it makes it very easy to load the data into data.