3using Newtonsoft.Json.Linq;
82 TValue? value = setting.
GetValue<TValue>();
92 public void Set(TValue? value)
101 settings.
SetValue(value ==
null ? JValue.CreateNull() : JToken.FromObject(value));
Gets thrown by the runtime.
Implements an Editable Setting.
BadEditableSetting(string name, TValue? defaultValue=default)
Creates a new Editable Setting.
void Set(TValue? value)
Sets the value of the Editable Setting.
readonly? TValue m_DefaultValue
The Default Value of the Setting.
BadSettings? Get()
Returns the settings object of the Editable Setting.
readonly string m_Name
The Name of the Setting.
BadSettings? m_SettingsObj
The Settings Object.
TValue? GetValue()
Returns the value of the Editable Setting.
Public Api for the Settings System.
void SetValue(JToken? value, bool invokeOnChange=true)
Sets the Json Token of the Current Settings Object.
JToken? GetValue()
Returns the Json Token of the Settings Object.
bool HasProperty(string propertyName)
Returns true if the Settings Object has the given Property.
Helper class that can be used to automatically load a settings object from a file.
BadSettings? Settings
Returns the Instance of the Settings Provider.
static T Instance
Returns the Instance of the Settings Provider.
Contains the Error Objects for the BadScript2 Language.
Contains the Settings Implementation.