Member-only story
Discovering the power of Unity’s Scriptable Objects
Let’s learn how this tool allows us to create efficient custom data types!
As a game creator, one of the important questions you’ll have to answer is: how is my data going to be stored in this project? With all the scripts, data files, sounds, images and other assets that compose a game, it can be hard to find a perfect project organisation!
But then, what about the special “custom” data structures? What if you wanted to keep some player stats, or global game settings, in a readable and easy-to-edit asset file?
In Unity, a super interesting tool for defining data structures and storing them in an efficient and flexible way are the Scriptable Objects. So in this episode, we’re going to use this amazing tool for auto-refreshing our UI and display the stats of our little viking hero!

This tutorial is available in video or text format — see below for the text version :)
Check out the Github repo with all my Unity tutorials! 🚀
So, what are Scriptable Objects?
Scriptable Objects are a special type of data containers that make it easy to save large amounts of data in self-contained and efficient project assets. Basically, they let us define our custom data types by specifying the data structure as a C# class, and then instantiate this class as many times as we need to get real usable data sources.
These Scriptable Objects are nice from a user perspective, because they offer a clear and beginner-friendly edit UI directly inside the Unity inspector panel — so once the data structure has been coded up, then anyone in the team can go ahead and refine the values of a specific data instance, which is great for non-coders gameplay artists.
In the end, a Scriptable Object is therefore the combo of a C# structure on the one hand, and one or more asset instances on the other hand. These instances are always up-to-date…