I’m beginning to learn scriptable object but there is a some fondamental concepts that I didn’t manage to understand even after watching tutorials.
If I populate a list with multiple scriptable object of the same scriptable object prefab script (for ex, “item”) will it be possible to modify a value of only one scriptable object in this list ? (ex: weight)
In lot of game, there is some item like sword that are identical but have different characteristics values. If you take all those swords, it can count like 1 million in some mmo, that mean I have to duplicate the same scriptable object script 1 million time ?
If it’s yes, why can’t I just make a monobehavior script. It’s basically the same, I have to duplicate it.
I don’t understand why we say scriptable object “store” the data and mono behavior don’t.
Thanks to any answer or advice; unity is really enjoyable to learn tho, I’m doing a mind map for better understanding.
ScriptableObjects are like MonoBehaviours except they exist outside of a Scene. They live in your project, like data, rather than a behaviour, which is in the scene. ScriptableObjects don’t get events like Update().
What you would likely do is use ScriptableObjects to store the data for different kinds of enemies (name, stats, sprites, prefabs, etc), and then use one MonoBehaviour to do the moving, jumping, and hitting the of the hero.
ok thanks I beginning to understand.
So if I want to make 2 identical ennemi with the same sprite, same asset, same stats. Like 2 skeletons. I have to make 1 scriptable object script as the structure of this, called for exemple « ennemi », then I create a new ennemi asset, call it skeleton instead, and then filling stats and sprits with skeletons assets and value.
But what if I just want to make 1 skeleton attack a little bit higher, like one is 5 the other is 6 ? Do I have to create a new ennemi asset called « skeleton2 » for a such little change ?
That is what I really don’t understand.
Thanks for the help mate.