-
Notifications
You must be signed in to change notification settings - Fork 560
Persistent Data
Through the Window -> 持久数据编辑器(persistent data editor) to view the persistent data stored in the game
You can add data through the 新增数据(Add Data) tab
You can clear the cache of persistent data by 清除缓存(clearing the cache) button
RecordManager
public static RecordTable GetData (string RecordName) Get a persistent data
public static string GetStringRecord (string RecordName, string key, string defaultValue)
Get a String record, or return a default value if it does not exist
...
RecordTable
public SingleField GetRecord (string key) Get a record
public string GetRecord (string key, string defaultValue)
Get a String record, or return a default value if it does not exist
public bool GetRecord (string key, bool defaultValue)
Get a bool record, or return a default value if it does not exist
public int GetRecord (string key, int defaultValue)
Get an int record, or return a default value if it does not exist
public float GetRecord (string key, float defaultValue)
Get a float record, or return the default if it does not exist
public Vector2 GetRecord (string key, Vector2 defaultValue)
Gets a Vector2 record and returns the default value if it does not exist
public Vector3 GetRecord (string key, Vector3 defaultValue)
Get a Vector3 record, or return a default value if it does not exist
public Color GetRecord (string key, Color defaultValue)
Get a Color record, or return the default value if it does not exist
public T GetEnumRecord <T> (string key, T defaultValue) where T: struct
Get an enumeration record, or return a default value if it does not exist
SingleField
slightly
currentGuideKey = RecordManager.GetStringRecord ("GuideRecord", "CurrentGuide", "");
RecordManager.SaveRecord ("GuideRecord", "GuideSwitch", true);