Hi fellow Unity developers,
When I attach a script to a GameObject in the hierarchy, its public members become visible in the Unity editor. This is a great feature, because it means everyone can tune values when the game is actually running. And you can just drag assets to make them available in scripts.
My problem is that the hierarchy is part of a scene, i.e. the (tuned) values are specific to that level only. After finding the right value, you have to copy them to all the other levels. For some values, this is fine. You want to set them differently for each level. However, some values are essentially game-global.
So my question is: is there a simple way to get per-game (or per-application) parameters in the Unity editor? I can do it by creating an empty 'common' level with just a dummy cube with a script attached that has my game-global values in a class. When I start a normal level, I use Application.LoadLevelAdditive(), which gives me access to the values in the class (in the next frame). This works, but it seems a bit too complicated.