My project is a tile based game (all C++ except for making materials, which is BP) on which I will be making several towns. Each town will have multiple buildings with each occupying a single tile. These static meshes will be relatively simply (a few cubes at most). At the moment. I am using a class of “Town” which spawns separate Actor classes of “Building” and stores the pointers and details within a TArray. This is a relatively straightforward way of doing it, but I was wondering if there was a more efficient way of doing this? Otherwise I’ll quickly have a very large number of actors. I was thinking of maybe having the “Town” as a scene component and attaching the buildings as components rather than as separate actors? I did try to do something similar to this: -
but I was unable to get them to be rendered.
Also, would it be more efficient to use one large texture/material that is broken up into areas that all the meshes can use or to use individual smaller textures for each buildings? i.e. would the engine load the large texture multiple times for each mesh or would it only load it once and let multiple meshes access it?