VR Development Framework
v 1.0.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
static string AVR.Core.AVR_Settings.get_string ( string  token)
inlinestatic

Get a registered setting of the type string.

Parameters
tokenToken identifying the given setting. A setting declared as domain = { setting = true } will be retrievable with the token /domain/setting.
Returns
Registered setting if a valid is found, otherwise an empty string.

Definition at line 88 of file AVR_Settings.cs.

88  {
89  if (settings.TryGetValue(token, out string ret))
90  {
91  return ret;
92  }
93  else if (!initialized)
94  {
95  initialize();
96  return get_string(token);
97  }
98  else
99  {
100  AVR_DevConsole.warn("Settings do not contain key \"" + token + "\". Using default value (empty string).");
101  return "";
102  }
103  }
static void initialize()
Initialize settings. Calling multiple times will have no effect, use reconfigure() if you want to re-...
Definition: AVR_Settings.cs:25
static Dictionary< string, string > settings
Dictionary containing all settings by their key. A setting declared as domain = { setting = true } wi...
Definition: AVR_Settings.cs:42
static bool initialized
Definition: AVR_Settings.cs:16
static string get_string(string token)
Get a registered setting of the type string.
Definition: AVR_Settings.cs:88