Answer the question
In order to leave comments, you need to log in
Prefabs with MonoBehaviour in Unity share common graphical resources or do I need to use ScriptableObject?
Let's say I have an Enemy prefab , it has a SpriteRenderer component with a sprite assigned. If you instantiate 100 such prefabs, will the SpriteRenderer components refer to 1 sprite in memory, or will each be allocated its own area in memory?
Or, in order to save resources, you need to use ScriptableObject and assign a sprite from SO when initializing the prefab?
The question is where is the best place to store a reference to a sprite for objects that can potentially number in the hundreds - in the MB of the prefab or SO, the reference to which will be in the MB of the prefab
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question