Along with the e-book, you can download a demo project from GitHub inspired by classic arcade game mechanics. The demo shows how ScriptableObjects can help you create components that are testable and scalable, while also being designer-friendly. Although a game like this could be built with far fewer lines of code, this demo shows ScriptableObjects in action.
Here’s a preview of what you can find in the guide:
Scriptable objects are great, This is a nice e-book that I will definitely keep around.
But when scriptable objects are mixed with the addressables package it can be a nightmare.
The e-book does not mention anything about using addressables or asset bundles. Not any reference that I could find quickly.
Once you have scene references and addressable references to scriptable objects they’re not the same object anymore.
So any shared data will be broken because it is a different instance of the scriptable object.
So for example, if the UI is loaded through addressables and your player is a built-in prefab (not addressable). When they share the same PlayerHealth scriptable object, they will be different instances of the scriptable object.
If the player would take damage, the UI wouldn’t know about it.
One way I used to avoid this issue is to make literally everything addressable.
Only a bootstrap scene that is built-in to then from that point on only load addressable scenes.
It would be nice if Unity found a solution to that problem in some way that does not involve moving everything to addressables.
You want to be able to update or release DLC content after a build is live. But that will be difficult if you’re using scriptable object references everywhere.
To be fair this is just a side-effect of assets getting duplicated across asset bundles/addressables groups. Addressables has an Analyze window that will show you exactly what assets are getting duplicated across your groups.
Naturally you should be using that regularly to ensure there are no duplicated assets.
If you plan to use addressables or asset bundles then you’re pretty much all in, yeah. It’s more or less the expected workflow. Though as you can make entire folders addressable, it’s not that hard to set up some primary folders that contain the majority of your assets without having to micromanage it yourself.