I have a blueprint which shows or hides an actor when the player presses the tab key and enlarges it when they press the left shift key (similar to a map overlay in an RPG, for example). The actor itself starts off empty, but when play starts I attach a child actor with some geometry to it dynamically. The geometry is received over the network from a custom server, so I can’t simply create it ahead of time in the editor.
The blueprint
works correctly when I launch the level as a standalone game, but when I launch it as a preview in the editor the keypresses have no effect on the dynamically added actor (although if I add an actor statically, e.g. a cube, then it does get modified as I’d expect).
I’m attaching the dynamic actor using C++, by calling
childActor->AttachToActor(parentActor, FAttachmentTransformRules::KeepRelativeTransform);
Any idea what I might be doing wrong? Could the childActor be getting attached to some component other than DefaultSceneRoot1 when I’m running in the editor preview? And why would this be different between the editor preview and the standalone game?
Thanks in advance!