I would like to access my app name in a Unity C# script; I've found
PlayerSettings.productName, however it requires
UnityEditor, which is only available in the editor.
So, in a normal application, how am I supposed to access its name, as it appears in the "product name" field of the player settings?
- It must be cross-platform
- retrieving the executable name (or directory) does not count
- duplicating data does not count (obviously I can create a
constwith the same name, the whole point of this question is to avoid doing that)
(since the goal is to avoid duplicating data, backwards techniques such as having a
const, and using that
const to update
PlayerSettings.productName is ok, as long as they require no extra step, i.e. they can be made to "run" automatically at compile time)