ScriptableObjects are awesome!

Hi Gang,

Recently I’ve been experimenting a lot with scriptable objects in Unity and if you haven’t checked them out before then you really should.

In short, they are data containers that can be saved as .asset files in your project, styled using editor scripting and accessed very simply by referencing the asset without having to worry about memory management.

When they were originally designed, the intent was to remove serialised fields from scenes and prefabs to help with the processing time of loading assets, also to act as a more logical data container (kind of like a one-to-many relationship in a database rather than a single table with all attributes).

However, a lot of people also want to use them to save progress data and settings. This seems to be leading to confusion because you can persist data quite easily while in the unity editor however once the app is built those .asset files become static.

TL;DR: I made a video that shows a simple way to persist scriptable objects (there are some links below it to other good resources):

Some good starting points for learning about ScriptableObjects:

https://docs.unity3d.com/Manual/JSONSerialization.html

1 Like

I also love scriptable objects! I’ve been using them for all sorts of things, dialogue systems, inventories, etc.
The topic is on our wishlist so we’ll probably cover it soon. :grinning:
It’s great that you’re sharing these resources so people can already get started.

Cheers!

1 Like

This topic was automatically closed after 166 days. New replies are no longer allowed.