Download

Leaking dependency at IHeadMountedDisplayModule.h?

I am having issues when packaging my game… the engine keeps complaining that some HMD related stuff is missing, even though I don’t use VR and I have everything I can conceivably disable related to VR disabled (including disabling it in UBTs BuildConfiguration.xml).

The error happens in IHeadMountedDisplayModule.h, where it’s complaining at line 38 that FHeadMountedDisplayModuleExt is missing. Well looking up FHeadMountedDisplayModuleExt I find this:


// HACK:  REMOVE ME.  Moving virtual method additions to IHeadMountedDisplayModule to this extension struct to allow for 4.11.1 to hot fix in the update
struct ENGINE_API FHeadMountedDisplayModuleExt
{
	virtual bool PreInitEx() { return true; }

	/*
	* Test to see whether HMD is connected.  Used to guide which plug-in to select.
	*/
	virtual bool IsHMDConnected() { return false; }

	/**
	* Get index of graphics adapter where the HMD was last connected
	*/
	virtual int32 GetGraphicsAdapter() { return -1; }

	/**
	* Get name of audio input device where the HMD was last connected
	*/
	virtual FString GetAudioInputDevice() { return FString(); }

	/**
	* Get name of audio output device where the HMD was last connected
	*/
	virtual FString GetAudioOutputDevice() { return FString(); }

	static void RegisterModule(IHeadMountedDisplayModule* InHMDModule, FHeadMountedDisplayModuleExt* InHMDModuleExt);
	static FHeadMountedDisplayModuleExt* GetExtendedInterface(IHeadMountedDisplayModule* InModule);

private:
	static TMap<IHeadMountedDisplayModule*, FHeadMountedDisplayModuleExt*> ModuleToExtMap;
};

So what the hell happened there in 4.11.1 and how do I get rid of it?

Did you try regenerating your visual studio project files and rebuilding?

Sure did, didn’t help unfortunately. However what did solve it was adjusting the BuildConfiguration.xml. Since I don’t use VR I removed all of the VR stuff via the BuildConfiguration. Turns out that bit got broken in 4.11.1.