Download

OnBeginPlay & OnEndPlay don't work in packaged build? (Cutsom HMD)

Hi I work for VRstudios and am adding a VR/HMD device to UE4.
The plugin implementation is working perfectly in the Editor VR-Preview mode.
However, when I make a packaged Win32_64bit build, neither “OnBeginPlay, OnEndPlay, AdjustViewRect or EnableStereo” get called.

Whats odd is “CalculateRenderTargetSize, RenderTexture_RenderThread and IsHMDConnected” gets called but almost nothing else required for setting up the HMD.

I launch the application via the cmd like so: “MyGame.exe -vr”.
I have also tried: “-stereo on”, “-hmd on” and “-hmd enable”… nothing works

I feel like I’m missing something simple here or something is broken in UE4 builds as its working in the Editor.

UE4 version: 4.10.4
OS: Windows 10 x64
GPU: Nvidia 980Ti
CPU: i7

Also just to point out I override this as well which still doesn’t help:
bool FVRstudiosHMD::Exec(UWorld* InWorld, const TCHAR* Cmd, FOutputDevice& Ar)
{
MessageBox(0, L"Method Hit: Exec", L"NOTE", MB_OK);
EnableHMD(true);
return true;
}

Nvr mind, got it working