DataFile.GetVector2
Declaration#
public Vector2 GetVector2(string section, string id, Vector2 defaultValue)Parameters#
| Name | Description |
|---|---|
| section | Section to read |
| id | Key to read |
| defaultValue | Default value |
Description#
Gets vector2 value for a key on a specific section
Usage#
Example
using NullSave.GDTK;using UnityEngine;
public class CodeSample : MonoBehaviour{
public void ExampleMethod() { // You can create your own DataFiles to work with DataFile target = new DataFile();
// Values in a custom DataFile are never saved/loaded by the system // They can be saved/loaded manually var result = target.GetVector2("customSection1", "vector2", Vector2.zero); }
}