Class SlugBaseSaveData
A helper for interacting with the game's save data.
Inherited Members
Namespace: SlugBase.SaveData
Assembly: SlugBase.dll
Syntax
public class SlugBaseSaveData
Methods
View SourceRemove(string)
Removes a value from the save data.
Declaration
public bool Remove(string key)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | The key for removing the value. |
Returns
| Type | Description |
|---|---|
| bool |
Set<T>(string, T)
Sets or adds a value to the save data.
Declaration
public void Set<T>(string key, T value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | The key for storing the value. |
| T | value | The value to be stored. |
Type Parameters
| Name | Description |
|---|---|
| T | The value's type. |
TryGet<T>(string, out T)
Gets a value from the save data.
Declaration
public bool TryGet<T>(string key, out T value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | The key for retrieving the value. |
| T | value | The stored value. |
Returns
| Type | Description |
|---|---|
| bool |
|
Type Parameters
| Name | Description |
|---|---|
| T | The value's type. |