- Home /
Question by
hasan_sad · Nov 10, 2021 at 04:08 PM ·
scriptableobjectmonobehaviour
should i inject scriptable object data to monobehaviour ?
So i have a turn base battle scene, where the enemies referencing the same scriptable object (4 goblins for example). I don't want to make another 3 Goblins SO. because if i do that, then every monster must have at least 2 identical SO.
So i came up with the idea of injecting the SO data to the MonoBehaviour through Setup function when instantiated. that way, every enemy referencing the same SO but not directly, so when i changed the value, it doesn't change the SO value.
What do you guys think about that ? im so sorry if this is a common idea. well its because im just a beginner
Comment
Answer by unity_ka6jgzfPPmtNCw · Nov 10, 2021 at 10:16 PM
ScriptableObjects are good for this purpose.