You can install this as a Package through Unity's PackageManager. (Optionally) Use my Git Package Updater to install (& update) git packages: https://github.com/Toorah/com.toorah-games.gitupdater
Included comes an Editor Window to quickly generate new classes for your own types.
It can be accessed via:
Window/Scriptable Variables/Generator
- By Default: There will be a List on the left, that includes the most used Unity Types to generate. These are also included by default to use without having to generate them.
Namewill be used as the Class Name, whereasTypeis how to use the Type in script:Stringvsstring,Intvsint, etc. Leaving theTypefield empty will use the same asName:GameObjectvsGameObject - Clicking the
>button on the left, will preview that entry on the right panel. - Clicking
-button on the right, will remove an entry. - Clicking
Addwill create a new empty entry - The Path is where generated classes will be saved. Use the Browse button to select a folder within Assets/
- Generate will create 2 scripts in Path. One for the Type entered, and a specific List<T> type
At the bottom-right of the Editor Window are 2 preview windows, to check the script file contents before they are generated.
To create Scriptbale Object Variables, go to:
Assets/Create/Scriptable Variables/*
Select the desired variable from either Single/ or List/.
You can also create Container Objects that are useful for Grouping variables under a single Asset.
To create a Container Object, select:
Assets/Create/Scriptable Variables/Container
In the Inspector you have the following features:
- At the top is the List of Variables that are created under this Asset
Add new Variableallows to create a new Variable with the Type selected in the DropDown and the name ofVariable Name. Once the type and name is set, click onAddto create a new Variable, it will be listed at the top.- Selecting a Variable in the List, will display its inspector directly (alternatively, select the asset for the corresponding variable in your project window, under the container asset)
Inspectors for different Scriptable Object Variables
Float Variable
Gradient Variable
GameObject List Variable
- Reference Class: Can be used with or without a variable object, to avoid having to create variable objects for everything, while allowing to use them anyway without changing the code
- Property Drawers for Scriptable Variables
- Better Generator Window
- Containers: Group Variables




