SaveSystem.GetVector3
Declaration#
public static Vector3 GetVector3(string section, string id, Vector3 defaultValue)Parameters#
| Name | Description |
|---|---|
| section | Section to read |
| id | Key to read |
| defaultValue | Default value |
Description#
Gets vector3 value for a key on a specific section
Usage#
Example
using NullSave.GDTK;using UnityEngine;
public class CodeSample : MonoBehaviour{
public void ExampleMethod() { // Persistent data can be set directly // You can separate your data into sections for faster save/load // The same key can be present on multiple sections // This value will be persisted on save/load var permResult = SaveSystem.GetVector3("demoSection", "vector3", new Vector3(1.2f, 3.4f, 5.6f));
// Temporary data may be used to keep values locally or between scenes // This data is never saved or loaded. var tempResult = SaveSystem.tempData.GetVector3("vector3Temp", new Vector3(7.8f, 9.0f, 10.1f)); }
}