Smart Variables is a system for Unity based on a Presentation about Game Architecture by Ryan Hipple.
It lets the user connect scripts to each other through a system of Scriptable Objects in a modular and convenient way.
The system is being used in and developed alongside Jello. It has proven itself to be very useful, and at this point I feel that it's ready for anyone else to use.
A variable is stored in Assets
A component defines an int variable reference in code
Because the variables are stored in assets, they can be persistent. With a simple switch, the variable will stay the same in-between play sessions and scene loads.
For easy debugging, a debug log toggle can be turned on, which will print all the changes, happening to the variable.
For persistence in builds, a variable saver can be assigned to variables, that will serialize their values in binary files and handle saving/loading
Imagine if you want to have multiple players, and therefore, multiple health point values per each one. It would be quite cumbersome to duplicate variables, stored in assets.
Just for that use case, there are Local collections, where the variables are stored in a component belonging to an object
Unlike when storing the object in assets, these variables are going to be duplicated together with the object.
The variables, that are described above, I call Smart References. On top of it, there is a system of Smart Variables. Unlike smart references, they can be set to behave as regular public variables.