Scriptable Object Collection
Most of the time when dealing with Scriptable Object they all belong to some sort of collections, let's say for example all your consumables on the game? Or maybe all your weapons? Or even all your in-app purchases. And dealing with this can be quite challenging since you have to rely on proper naming of those scriptable objects, this can become a problem super fast as the project continues to grow.
The ScriptableObjectCollection exists to help you deal with scriptable objects without losing your sanity! Its a set of tools that will make your life a lot easier.
Check the FAQ with more examples and use examples.
- Allow access Scriptable Objects by code, reducing the number of references on the project
- Group Scriptable Objects that bellows together in a simple coherent interface
- Enable a dropdown selection of all the items inside a collection when the item is serialized through the inspector
- Automatically generate static access code
- Allow you to expose the entire object to be tweakable in any inspector
- Makes the usability of Scriptable Objects in bigger teams a lot better
- Iterate over all the items of any collection by
- If you are using the Static Access to the files, if any of the items goes missing, you will have an editor time compilation error, super easy to catch and fix it.
How to use
- Create new collections by the wizard
Assets/Create/Scriptable Object Collection/New Collection
- Now you should treat your new
ScriptableObjectCollectionas a regular
ScriptableObject, add any item you wan there
- Now add new items to the collection by using the buttons on the Collection Inspector
- After you are done, click on Generate Code on the collection to generate the Static access to those objects
Unity 2018.4.0 or later versions
openupm add com.brunomikoski.scriptableobjectcollection
You can also install via git URL by adding this entry in your manifest.json
Unity Package Manager
from Window->Package Manager, click on the + sign and Add from git: https://github.com/badawe/ScriptableObjectCollection.git
- You can freely use Scriptable Object Collection in both commercial and non-commercial projects
- You can redistribute verbatim copies of the code, along with any readme files and attributions
- You can modify the code only for your own (company/studio) use and you cannot redistribute modified versions outside your own company/studio (but you can send pull requests to me)