Well, it seems like a good thing to have. Actually for this exact case we might want something like a cvar that can disable any optional plugin in UE core. Then you could put that cvar call into an ini to turn off optional functionality.
However I went ahead and implemented the following hook:
/**
* Fill the array with optional extensions blocked by this plugin.
* This can be used to disable optional extension usage by the UE OpenXR core and by other ExtensionPlugins.
* Required extensions either from UE OpenXR core or from ExtensionPlugins are NOT blocked. In the latter case disabling plugins may have the
* same effect. Otherwise code changes will be needed.
* In general blocking optional extensions used by UE’s OpenXR core should be ok because it is designed to run correctly without those extensions
* and it seems likely the blocking plugin is replacing that functionality somehow.
* Blocking optional extensions added by plugins is potentially more complicated and ExtensionPlugins that do this may make themselves harder to use
* along with other ExtensionPlugins. They are optional, so it should work, but feature use may become complex.
* Plugin settings to explicitly disable extension use or splitting plugins up so that features can be individually enabled/disable should be considered.
* If false is returned the returned extension list will be ignored.
*/
virtual bool GetBlockedOptionalExtensions(TArray<const ANSICHAR*>& OutExtensions)
{
return false;
}
What this does is that in OpenXRHMDModule.cpp when we are adding optional extensions for UECore and when we are adding optional extensions for ExtensionPlugins (including this one!) we skip adding them to the optional request list.
I’m going to add the cvar feature i described above as well and expect to submit this soon.
[Attachment Removed]