HKI Core
|
This system loades, saves and stores settings. In addition to that it sets settings in the engine for all settings that are used and that are Unity-Settings. It can be extended with custom settings but a change function needs to be register for applying changes at runtime. More...
Public Member Functions | |
void | Init () |
The init function will load and tries to activate all settings. Some settings can't be set in the editor so it will make sure if it's in editor or runtime mode. More... | |
void | Save () |
Saves all settings (custom settings that are given to this system too) into a XML file. More... | |
Public Member Functions inherited from HKI.Core.Variables.Container | |
override void | Save (XmlNode parentNode) |
override void | Load (XmlNode node) |
override string | ToString () |
HKIVar | GetHKIVarByName (string varName) |
HKIVar | GetHKIVarByNameWithoutSpace (string varName) |
HKIVar | GetHKIVarByIndex (int index) |
Private Member Functions | |
void | OnDisable () |
void | GetReferences () |
This helper function gets all references to Unity standard settings. For a list look into the class description. More... | |
T | GetVar< T > (string variableName) |
Search function for a variable, so it can be used to find the references. More... | |
bool | Load () |
This function loads the saved settings from a XML file and tries to activate them. More... | |
void | CreateConfigFile () |
This function will create the config file. This could be the case on the first time the game starts after installation. It fills the file with the default settings that are set in the editor and activate them. More... | |
void | ActivateAllSettings () |
This function activates all settings. More... | |
void | LinkStandardSettingsToOnChangeFunctions () |
This function links the change functions to the standard settings variables. More... | |
void | UnLinkStandardSettingsFromOnChangeFunctions () |
This will unlink the change functions from standard settings variables. More... | |
void | LogInfoForNotSetableInEditor (HKIVar variable) |
void | ChangeResolution () |
This function will set the resolution. More... | |
void | ChangeQuality () |
This function will set the quality. More... | |
void | ChangeFrameRateAndVSyncMode () |
This function will analyse the FrameRateAndVSyncMode value and set the frame rate and vsync accordingly. More... | |
void | ChangeFrameRateAndVSyncMode (int fr, int vsync) |
This function will set the frame rate and vsync. More... | |
void | ChangeAudio () |
This function will set all audio volume settings. More... | |
Private Attributes | |
bool | isEditor = false |
bool | changeFunctionCallbacksLinked = false |
string | configFilePath = "" |
string | ConfigFilename = "config.config" |
string | EditorPath = "" |
string | runtimePath = "" |
bool | WarningsEnabled = true |
bool | UseTargetFrameRate = true |
IntegerWidthHeight | Resolution = null |
Boolean | Fullscreen = null |
Integer | RefreshRate = null |
String | Quality = null |
FrameRateAndVSyncMode | FRAVSM = null |
AntiAliasingMode | AAM = null |
Language | TextLanguage = null |
Language | AudioLanguage = null |
FloatMinMax | MasterVolume = null |
FloatMinMax | MusicVolume = null |
FloatMinMax | AmbientVolume = null |
FloatMinMax | FxVolume = null |
FloatMinMax | UiFxVolume = null |
FloatMinMax | VoicesVolume = null |
AudioMixer | AudioMixer = null |
Additional Inherited Members | |
Protected Member Functions inherited from HKI.Core.Variables.HKIVar | |
void | RaiseOnValueChangedCallback () |
Properties inherited from HKI.Core.Variables.Container | |
int | Count [get] |
Events inherited from HKI.Core.Variables.HKIVar | |
System.Action | OnValueChanged |
This system loades, saves and stores settings. In addition to that it sets settings in the engine for all settings that are used and that are Unity-Settings. It can be extended with custom settings but a change function needs to be register for applying changes at runtime.
Supported standard settings:
Definition at line 33 of file SettingsSystem.cs.
|
inlineprivate |
This function activates all settings.
Definition at line 199 of file SettingsSystem.cs.
|
inlineprivate |
This function will set all audio volume settings.
Definition at line 456 of file SettingsSystem.cs.
|
inlineprivate |
This function will analyse the FrameRateAndVSyncMode value and set the frame rate and vsync accordingly.
Definition at line 412 of file SettingsSystem.cs.
|
inlineprivate |
This function will set the frame rate and vsync.
Definition at line 447 of file SettingsSystem.cs.
|
inlineprivate |
This function will set the quality.
Definition at line 392 of file SettingsSystem.cs.
|
inlineprivate |
This function will set the resolution.
Definition at line 378 of file SettingsSystem.cs.
|
inlineprivate |
This function will create the config file. This could be the case on the first time the game starts after installation. It fills the file with the default settings that are set in the editor and activate them.
Definition at line 190 of file SettingsSystem.cs.
|
inlineprivate |
This helper function gets all references to Unity standard settings. For a list look into the class description.
Definition at line 120 of file SettingsSystem.cs.
|
inlineprivate |
Search function for a variable, so it can be used to find the references.
T |
variableName |
T | : | HKIVar |
Definition at line 144 of file SettingsSystem.cs.
|
inline |
The init function will load and tries to activate all settings. Some settings can't be set in the editor so it will make sure if it's in editor or runtime mode.
Implements HKI.Core.Init.IInit.
Definition at line 70 of file SettingsSystem.cs.
|
inlineprivate |
This function links the change functions to the standard settings variables.
Definition at line 210 of file SettingsSystem.cs.
|
inlineprivate |
This function loads the saved settings from a XML file and tries to activate them.
Definition at line 161 of file SettingsSystem.cs.
|
inlineprivate |
Definition at line 369 of file SettingsSystem.cs.
|
inlineprivate |
Definition at line 96 of file SettingsSystem.cs.
|
inline |
Saves all settings (custom settings that are given to this system too) into a XML file.
Definition at line 106 of file SettingsSystem.cs.
|
inlineprivate |
This will unlink the change functions from standard settings variables.
Definition at line 302 of file SettingsSystem.cs.
|
private |
Definition at line 54 of file SettingsSystem.cs.
|
private |
Definition at line 59 of file SettingsSystem.cs.
|
private |
Definition at line 56 of file SettingsSystem.cs.
|
private |
Definition at line 64 of file SettingsSystem.cs.
|
private |
Definition at line 37 of file SettingsSystem.cs.
|
private |
Definition at line 41 of file SettingsSystem.cs.
|
private |
Definition at line 39 of file SettingsSystem.cs.
|
private |
Definition at line 42 of file SettingsSystem.cs.
|
private |
Definition at line 53 of file SettingsSystem.cs.
|
private |
Definition at line 50 of file SettingsSystem.cs.
|
private |
Definition at line 60 of file SettingsSystem.cs.
|
private |
Definition at line 36 of file SettingsSystem.cs.
|
private |
Definition at line 57 of file SettingsSystem.cs.
|
private |
Definition at line 58 of file SettingsSystem.cs.
|
private |
Definition at line 52 of file SettingsSystem.cs.
|
private |
Definition at line 51 of file SettingsSystem.cs.
|
private |
Definition at line 49 of file SettingsSystem.cs.
|
private |
Definition at line 43 of file SettingsSystem.cs.
|
private |
Definition at line 55 of file SettingsSystem.cs.
|
private |
Definition at line 61 of file SettingsSystem.cs.
|
private |
Definition at line 47 of file SettingsSystem.cs.
|
private |
Definition at line 62 of file SettingsSystem.cs.
|
private |
Definition at line 45 of file SettingsSystem.cs.