Lets say i have a prefab containing an audiosource component with an audio clip already set up in it.
If I instantiate 2 copies of the prefab, will 2 copies of the audio clip be created in memory? and so on?
I read somewhere that it would be better to do:
Use resources.load to load an audio clip into some variable, and have any copies of the prefab just reference that one audio clip variable?
Or can i setup an audio clip variable somewhere in the editor and then just have the prefabs reference it during runtime?
Because this way there will be only one copy of the clip in memory.
In my game in particular, i only have around 6-7 audio clips for the prefab, but there can be 30-40 copies of the prefab in memory at any moment, so does this mean that there will be a whopping 30 times 6 = 180 memory clips in memory at once!?!?
It seems like loads of memory can be saved by just storing the clips in some separate script and reference to them from the prefabs.