편집

다음을 통해 공유


ProjectPreferences.Set Method

Definition

Overloads

Set(String, Boolean, Boolean)

Save bool to preferences and save to ScriptableObject with key given.

Set(String, Int32, Boolean)

Save int to preferences and save to ScriptableObject with key given.

Set(String, Single, Boolean)

Save float to preferences and save to ScriptableObject with key given.

Set(String, String, Boolean)

Save string to preferences and save to ScriptableObject with key given.

Set(String, Boolean, Boolean)

Save bool to preferences and save to ScriptableObject with key given.

public static void Set (string key, bool value, bool forceSave = true);
static member Set : string * bool * bool -> unit
Public Shared Sub Set (key As String, value As Boolean, Optional forceSave As Boolean = true)

Parameters

key
String
value
Boolean
forceSave
Boolean

Remarks

If forceSave is true (default), then will call AssetDatabase.SaveAssets which saves all assets after execution

Applies to

Set(String, Int32, Boolean)

Save int to preferences and save to ScriptableObject with key given.

public static void Set (string key, int value, bool forceSave = true);
static member Set : string * int * bool -> unit
Public Shared Sub Set (key As String, value As Integer, Optional forceSave As Boolean = true)

Parameters

key
String
value
Int32
forceSave
Boolean

Remarks

If forceSave is true (default), then will call AssetDatabase.SaveAssets which saves all assets after execution

Applies to

Set(String, Single, Boolean)

Save float to preferences and save to ScriptableObject with key given.

public static void Set (string key, float value, bool forceSave = true);
static member Set : string * single * bool -> unit
Public Shared Sub Set (key As String, value As Single, Optional forceSave As Boolean = true)

Parameters

key
String
value
Single
forceSave
Boolean

Remarks

If forceSave is true (default), then will call AssetDatabase.SaveAssets which saves all assets after execution

Applies to

Set(String, String, Boolean)

Save string to preferences and save to ScriptableObject with key given.

public static void Set (string key, string value, bool forceSave = true);
static member Set : string * string * bool -> unit
Public Shared Sub Set (key As String, value As String, Optional forceSave As Boolean = true)

Parameters

key
String
value
String
forceSave
Boolean

Remarks

If forceSave is true (default), then will call AssetDatabase.SaveAssets which saves all assets after execution

Applies to