Declaration
public static bool LoadSettings<TSettings>(
out TSettings settings,
string filename = null,
SettingsSerializer? serializer = null
)
Summary
Loads settings into the specified class, or, if not available, creates a new instance of the class. See
Remarks.
Generic type parameters
TSettings | This type parameter is not documented. |
Parameters
out TSettings | settings |
Destination - the settings class will be placed here |
string | filename |
If specified, overrides the filename that is normally derived from the values specified in the SettingsAttribute on the settings class. |
SettingsSerializer? | serializer |
If specified, overrides the serializer specified in the SettingsAttribute on the settings class. |
Returns
true if loaded an existing file, false if created a new one.
Remarks
If the settings file exists but can't be loaded, this function will automatically create a backup of the
settings file. If the file is opened exclusively by other code, will retry reading from it for up to 1.5
seconds.