Meta saver
Combining [HideInInspector]
and public
, you can define the default value of an Object
. Usefull to define default values in Editor. The value will be stored in the .meta
file. This values will be maintained in releases.
You can use this method to define your main configuration for your game. (in your GameManager)
#region config
[HideInInspector] public GameConfigEditor MainConfig; // ScriptableObject containing main game configs (dev and release)
public GameConfig GameConfig {
get {
#if UNITY_EDITOR || DEVELOPMENT_BUILD
return MainConfig.DevGameConfig;
#else
return MainConfig.ReleaseGameConfig;
#endif
}
}
#endregion