ScriptableObjects are a type of asset within Unity which can hold custom data and functionality. They are very comparable to a prefab which cannot be instantiated in the scene, and only hold data and/or provide methods to call. You can program your own scriptable objects, allowing you to create your own asset types such as sounds, data files, weapon categories, damage types, enemy factions, inventory items, and more. Scriptable objects give a lot of power to the game designers, removing the common idea that everything needs to be a MonoBehaviour.
This utility collection category contains a few scriptable objects designed for use in programming and game development.
A Config is a Scriptable Object which can self-instantiate. If there is no config asset within your project hierarchy, it is automatically generated within the Resources folder. Whatever references the config will always find the correct asset, locating it within the resources folder by name.
Don't change the config's name. That will make the config file invalid and ignored. You can freely move it to other Resources folders, though.
A Runtime Set is a ScriptableObject which contains a list of a specific type of objects. To use it, you need to write your own Runtime Set script and pass it a type to include. Instances of Runtime Sets can keep track of groups of objects such as all enemies, all pickups, all projectiles or more, offering easily accessible points in your project with which to trigger them.
You need to add and remove objects to their respective lists by script. There is no automatisation here.
A GameEvent is a ScriptableObject which can fire an event. Any other script can listen for this event to be triggered, to execute their own functionality at the right time.
For example, a GameEvent could be OnPlayerHit. All scripts that should play an effect when the player is hit listen to it. The player controller would then call the FireEvent() of the GameEvent, triggering everything that listens to it.
The GameEvent shows a button in the inspector GUI which fires the event when clicked as well. Useful for testing the responses without running the entire gameplay.
It's especially useful for testing effects and changes in user interface elements caused by gameplay code, without actually playing the game.
A Game Event Listener is a MonoBehaviour which automatically listens to a GameEvent set in the inspector GUI. When the GameEvent fires, the listener triggers an UnityEvent.
This UnityEvent can call any public function of any script it can reference to, all set within the inspector GUI.
-