I am building a mobile game, which will have about 100 game items a player can obtain as she progresses through the game. Also, there will be a number of different enemies. Besides its gameplay parameters like HP, a game item will have a couple of images (small, big) and a monster will have an image and a 3d model.
I am in the process of finding the best way to store those data internally so that I could spawn necessary items and monsters dynamically and, at the same time, it won’t be an overhead for the memory.
One option is to have a game object with an array of prefabs, which is always in the scene so that I can request to spawn an object at any time. I don’t really understand if the prefabs in this array will consume the same amount of memory as the spawned game object, or it will be just a reference to a prefab in the project hierarchy. Or maybe use Scriptable Objects instead of Prefabs, but the question about memory consumption remains the same.
Another option was to have everything in the Resources folder so that I could go and do Resources.Load(), but this would impact the overall build size. To reduce the build size I would consider loading my data (sprites and models) from an external resource, but never worked with that before, so need an advice here.
How do you tackle these kinds of things in your projects?