I have a custom menu item to display the currently installed version of our SDK. Currently, it’s being hardcoded such as the following:
[MenuItem("SDK/Version: 2.1.2", false, 15)]
static void init(){}
However, I’d like it to be read from a text file (which gets updated automatically by a separate process). So, it should look something like this:
string version = "SDK/Version: " + GetVersion() //reads the version from a text file
[MenuItem(version, false, 15)]
static void init(){}
However, Unity doesn’t let you pass in variables as attributes and has to be a constant. How can I achieve this?
Thanks!