Packaging for both Oculus Store *and* Vive

Hi everybody,

How can I deploy two versions of my game, one with SteamVR plugin enabled, one without.*

As I have a blueprint that depends on the SteamVR plugin, that would somehow need to be excluded also.

(Why? Oculus Store does not allow openvr_api.dll, so I cannot have SteamVR plugin for that package.)

Thank you!
Cheers, Jonathan

  • I could do this by having to branches in git, but I would love getting around having to maintaining those, especially since .uasset files are not particuarly mergible.

Can I ask what is in the blueprint that requires SteamVR? We build for both platforms, but use a lot more C++ so have #defines for the seperate platforms. The only other annoying thing is having to change the .project file to swap the subsystem from Steam to Oculus and also the DefaultEngine.ini to use the correct DefaultPlatformService and NET Drivers.

If there is a better way to deal with these problems too I’d also be interested.

Thanks for your answer! Moving the SteamVR specific stuff (I believe it’s the chaperone in this case) to C++ seems like a good idea. That is the only thing not really maintainable in two diverging git branches. The rest is easily rebasable on new game changes.

How did you undefine the chaperone in C++? I added a “WITH_STEAM” #define to not compile everything Steam related, but the #if can’t be used around UPROPERTY. So I can’t do this:

#if WITH STEAM
	// Steam VR Chaperone component
	UPROPERTY(VisibleDefaultsOnly)
	class USteamVRChaperoneComponent* SteamVRChaperoneComponent;
#endif

EDIT: I ended up spawning the Steam Chaperone in BeginPlay instead of having it as an UPROPERTY.

Steeve, I’m having this same issue, could I ping you?

Sure but I think the easiest is to post your question here?

Basically what has happened, is I recently upgraded to 4.21, Oculus Build and Epic build. In 4.20.3, I was able to package, and delete the openvr_api.dll manually, and the game would still launch, and I was able to upload to the oculus store. Now, if I package with it, and delete openvr_api.dll manually, the game won’t launch at all. If I disable or remove the SteamVR plugin, to remove openvr_api.dll automatically, then my VR Pawn throws up many errors because the VRBlueprints in Unreal use that SteamVR plugin, I believe. It sounds like you had the exact same issue I’m dealing with. I’m just trying to keep my pawn as is and remove openvr_api.dll so I can upload to the Oculus Store. Any advice is much appreciated. Thanks in advance.

Hey, no sorry, I did not have this kind of issue. Plus I’m still on 4.20.3. I never deleted openvr_api.dll manually. When I want to build for Oculus, I disable the OnlineSubsystemSteam and SteamVR plugins, and I delete the related stuff inside the PlayerPawn. I also added a “WITH_STEAM” macro in the code to avoid compiling Steam specific code.

That’s what I need to do though, make it so it’s not calling Steam at all, that way I don’t have to use the plugin or openvr_api.dll.

I’ve managed to get it to launch, but now because I’ve removed the SteamVR plugin and openvr_api.dll, to meet Oculus Store requirements, once I launch the .exe, it won’t load into my Oculus Rift CV1. I have pawn setup for auto possess, I also have Start in VR enabled. Using Oculus Branch of UE4 4.21. It works fine in 4.20.3… this is frustrating… any thoughts?