This package contains a system for creating variables based on ScriptableObjects in Editor.
npm install cz.xprees.variables
This package contains a set of variables based on the ScriptableObjects,
which make it great for storing and simply sharing state without tight coupling.
Moreover, it provides a way to share variables (state) across multiple scenes making it powerful for multi-scene Unity project.
- ScriptableObject Variables - A set of variables that can be used to store and share state across scenes.
- Simply extend the VariableBaseSO class to create your own variable types, see examples in
the BoolVariable folder.
- Watchable Variables - You can subscribe to onValueChanged event to get notified when the value changes.
- References - A way to reference variables or inlined values in the Project (changeable in the Inspector).
- You can directly set the value in the Inspector or reference a variable.
- This makes flexible go to choice how to use the variables or inlined values in your scripts.
- Variable Modifiers - Wrapper classes that allow you to modify the value of the variable in a specific way.
- For example, you can use the BoolModifier
- Variable Aggregations - A set of classes that allow you to aggregate multiple variables into one.
- For example, you can use the BoolAggregation to aggregate multiple boolean variables into one.
Install the package using npm scoped registry in Project Settings > Package Manager > Scoped Registries
Unity Docs - Install a UPM package from a Git URL
``json
{
"name": "NPM - xprees",
"url": "https://registry.npmjs.org",
"scopes": [
"cz.xprees",
"com.dbrizov.naughtyattributes"
]
}
`
Then simply install the package using the Unity Package Manager using the _NPM - xprees_ scope or by the package name cz.xprees.variables`.