Got a really weird bug here. So our VR game has a replay mode, and the spectator pawn has a dashboard with physical controls attached as a child actor component. When I play a replay, all this works just fine.
However, the spectator pawn is controlled by a controller, BP_ReplayController. I want to change its parent class to a C++ class deriving from APlayerController. When I change BP_ReplayController’s parent to this class, the dashboard spawns but immediately gets destroyed. I don’t have any code doing this anywhere, so I have no idea what’s causing it.
There’s no errors in the log, and I can’t step through code since the project is a BP project (The C++ class is from a plugin I wrote). If I use the spectator pawn as a player in the non-replay mode, the dashboard spawns just fine.
I’m initializing the ReplayController C++ class like:
AReplayController::AReplayController(const FObjectInitializer& ObjectInitializer) : APlayerController(ObjectInitializer) { ...}
And I’m making sure to call Super::BeginPlay in BeginPlay, the only function I’m overriding.
I’m tempted to say this is an engine bug, but I couldn’t find a repro case using a blank project. Any ideas about what the cause might be?