From what I’ve learnt, they are like containers for data for gameobjects, which, sounds useful. Nevertheless, when I started using them the ‘right’ way, I quickly found out that any parameters changes across all SOs. Meaning, for example, there are 2 units that differ only in 1 parameter (e.g. player vs AI). They use the same SO. When I check one of them to AI, the same happens to the other. The same is true for all mutable values, e.g. maxHealth is immutable, but currentHealth is. So if currentHealth value changes for 1 unit, it does so for all other units of this type!
So I have 2 questions really:
When are SO useful? If I can’t use SOs for holding all type of data, what are the options apart from putting everything in the monobehavior script attached to the gameobject?
Hope it makes sense.
submitted by /u/Curious_Foundation13
[link] [comments]
Unity 3D – News, Help, Resources, and Conversation