Skip to content

Variables Getting Started

Richard Kopelow edited this page Aug 5, 2018 · 1 revision

Variables - Getting Started

Defining Variables

  1. Right click in the project explorer or go to the Asset menu.
  2. Click in Create -> Scriptable Objects -> Variables -> Variable Type.

Referencing Scriptable Object Variables

  1. Define a Value for the type you want.
public IntValue PlayerHealth;
  1. Click the arrow icon to the left of the field to switch between SO Variables and hardcoded values.
  2. Link up your field with the SO value or set a value.

Saving values from runtime

SO Variables can be set to save their value at runtime.

Clone this wiki locally