I have a number of BP actors which derive from mutual BP class. Each of this actors have unique ID (for purpose of this question let’s assume this is the only difference between them). How do I spawn actor with given ID.
For example I have 10 “Cube” BPs childed from “GenericCube” BP (which has integer variable named “ID”), each of “Cube” BPs “ID” variables are set to numbers from 1 to 10, unique for each of them and I need to spawn one, that has ID = 4. How do I do that?
Possible decition is to spawn all of them, put their references into array, find out which of them have desired ID, keep it’s reference and destroy others, or spawn them one by one, destroying them consiquently, until desired one is spawned, and then keep it. But it seems kind of excessive, especially if I there’s hundreds and thousands of IDs
But correct me if I’m wrong, in that case I don’t need any child BPs, just
“GenericCube”, which I would spawn, giving its spawned instances different properties (variable values)? For me that would work, I just want to know if I got that right.
I’ts actually a kind of card game, each card has around 10 properties, they share common mesh, but have various textures (materials). There’ll be around 150 unique cards, but in game I plan to spawn simultaneously not more that 20 of them.