Hi There
Working with World Partion and DataLayers, i try to figure out an efficient way to spawn in a bunch of actors at runtime and make them visible at a later point in the game.
I’m aware of the “hidden in Game” node but since it is a whole bunch, and varying amount of actors, this seems to be not efficient to do on every singe actor. Also, when having a parent actor, or an owning actor, toggling its visibilty has no effect to children.
When spawing the actors, i can easely bind them to an owner (sitting in the desired DataLayer), which places the actors automatically in the related Layer. Then, (SetDataLayerRuntimeState) i can toggle them (i.e. the whole Layer) between Loaded (invisible) and Activated (visible). But now, the struggle starts…
When the Owner Object is in loaded state (invisible), trying to spawn any actors with that owner reliably crashes the engine. When trying to destroy any actor, which has an Owner in loaded (invisble) state, the engine crashes reliably. While this may be somewhat expected, and probably is just a sign of missing error catching (is it activated or not?) on my side, or the engine itself, it rises the question: Is this the intended behaviour? Is it true, that we can’t spawn actors in loaded but not activated layer? How can this be achieved?
Given the above behaviour is intended, i come back to the question: what might be an efficient way to spawn in a bunch of actors to a DataLayer and make them visible at a later point in time.