Let’s suppose I have one actor named ACT_THINGS and within that ACT_THINGS there are 50 different objects (movable static mesh) and each time the game spawns that ACT_THINGS each of these 50 objects will adopt a different position, but all pre-defined and not random.
What would be the most efficient way to save these locations (vectors) to load for each of the 50 objects each time ACT_THINGS spawns? JSON? Structure and Data Table?
Note: if I have 20 different combinations it would be 20 x 50 = 1000 vectors to store.
Sounds like an array of these to me if you know you’re going to spawn all:
Perhaps a soft reference if you’re only going to spawn some, not all.
A data table might be desirable if you want to organise, edit, expand on that data - but you’ll need a struct for it anyway… If you have a very limited number of object types, you could be better off with an enum / vector.
Depends on what’s the long game for this, what you need to filter and how expandable it’s supposed to be. Hard to tell from the limited scope presented here. If that’s all what’s needed, I’d just chuck it all in into a struct array and it should be more than fine.
If you have a lot of unique objects and need a quick lookup, a map dictionary is a great alternative.
This actor, is it a blueprint?