How to check the platform is VR, except (GEngine->XRSystem.IsValid() && GEngine->XRSystem->GetHMDDevice() && GEngine->XRSystem->GetHMDDevice()->IsHMDEnabled()). as GEngine is NULL in constructer of GameMode so it's not able to use this code there

how to check the platform is VR, except (GEngine->XRSystem.IsValid() && GEngine->XRSystem->GetHMDDevice() && GEngine->XRSystem->GetHMDDevice()->IsHMDEnabled()). as GEngine is NULL in constructer of GameMode so it’s not able to use this code there.