Get actor reference from persistent level
Is there a way to have a direct access to an Actor in the Persistent level from one of his sub level? By direct reference I mean selecting the asset in the viewport, right clicking in the blueprint and having the options to "Add reference to 'MyActor' "
Right now I have
And I want the level blueprint of Map1 to be able to have a direct access to one of the actor that is in MapMain.
I have MapMain hold all the actors that would be persistent and Map1 and Map2 would hold static assets that would need to be streamed when needed. Map1 and Map2 also holds their respective triggers for various interactions.
I could do a GetAllActorFromClass but it would be nice to be able to have access to the objects from the persistent level
I would suggest that instead of trying to reference an object directly in another streamed level, which is an inherently brittle thing to do, consider using an event dispatcher or a blueprint interface to implement a function that does what you want it to do.
So instead of trying to manipulate the objects directly in the streamed level, you throw an event or call a function, and then the level blueprint that contains the objects does what you need it to do with them. In the long run, this is going to be safer and less-prone to breakage than trying to reference objects across levels.
answered Jun 13 '18 at 03:37 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here