Hi folks,
I am working on my UnrealEd-Plugin and for a new feature I need to find an actor in the editor world (NOT PIE) with its replica from the PIE-world.
As far as I can tell all objects in the editor will be get replicated when entering play mode. That is, having a valid actor instance during play mode does not mean its valid when leaving play mode. Now I want to be able to get the replicas prefrab (actor) from the editor world. How would I do that?
Right now my solution is:
- when entering play mode: save the actors (the replica) name (Actor->GetFName())
- when leaving play mode: find the actor (the prefab) by the replicas name via TActorIterator and GEditor->GetWorldContext()->World()
This somehow works, but seems very fragile. How instance when changing the actors name through the level hierarchy I wont be able to find the actor.
Is there a better way to achieve what I am trying to do here?
Cheers,
Tobs.