Tutorial by Examples

ScriptableObjects are serialized objects that are not bound to scenes or gameobjects as MonoBehaviours are. To put it one way, they are data and methods bound to asset files inside your project. These ScriptableObject assets can be passed to MonoBehaviours or other ScriptableObjects, where their pub...
You create new ScriptableObject instances through ScriptableObject.CreateInstance<T>() T obj = ScriptableObject.CreateInstance<T>(); Where T extends ScriptableObject. Do not create ScriptableObjects by calling their constructors, ie. new ScriptableObject(). Creating ScriptableO...
Extra care should be taken when accessing serialized fields in a ScriptableObject instance. If a field is marked public or serialized through SerializeField, changing its value is permanent. They do not reset when exiting playmode like MonoBehaviours do. This can be useful at times, but it can also...
To find active ScriptableObjects during runtime, you can use Resources.FindObjectsOfTypeAll(). T[] instances = Resources.FindObjectsOfTypeAll<T>(); Where T is the type of the ScriptableObject instance you're searching. Active means it has been loaded in memory in some form before. This me...

Page 1 of 1