I am trying to spawn actors from an array of actor references stored in a separate variable, but I’m having trouble figuring out how I can spawn the referenced actor rather than spawning a new object of the same type and copying values over (expensive and does not propagate back to the parent object). This is all in blueprints. The scenario is:
- Spawn Parent Object. Parent Object contains a member variable of type Array of Child Object
- Parent Object reads from a data table and selects rows that contain Parent Object-relevant structs
- Parent Object uses the data from that table to spawn and instantiate Child Object
- Parent Object stores a reference to Child Object in its Array of Child Object
- A reference to Parent Object is stored in the Game Instance
- Switch map from Parent Object-relevant map to Child Object(s)-relevant map
- Access Parent Object through the Game Instance’s reference, then spawn all stored Child Objects by iterating Array of Child Object
This is where I hit a brick wall. I want Child Object data to be persistent between transitions between the Parent Object map and the Child Object(s) map, so simply copying over the Child Object(s) is a poor solution. However, there is no “spawn actor from reference” node or anything similar that I have found. On the other hand, it seems like this would be basic functionality that I am just missing.
Any help would be appreciated.