Download

How to compile to VR(default 1stPerson view) & Mobile(3rdPerson view) from one same project and source code?

how to compile to VR(default 1stPerson view) & Mobile(3rdPerson view) from one same project and source code ?
Thank!

You’d want to manually decide which Pawn to spawn and not rely on the GameMode to spawn the Pawn for you. Use something like IsHMDEnabled or GetPlatformName to figure out which platform/device it is and have EnableHMD=True/False on Begin Play for the different Pawns.

Thank you very much !

should i do this in AGameModeBase::InitGameState or StartPlay ? InitGame seems too early for this