ProblematicOpenXRApiLayerInfos

ProblematicOpenXRApiLayerInfos

#Overview

name: ProblematicOpenXRApiLayerInfos

The value of this variable can be defined or overridden in .ini config files. 1 .ini config file referencing this setting variable.

It is referenced in 2 C++ source files.

#Summary

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Plugins/Runtime/OpenXR/Config/Engine.ini:2, section: [OpenXR]

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Plugins/Runtime/OpenXR/Source/OpenXRHMD/Private/OpenXRHMDModule.cpp:868

Scope (from outer to inner):

file
function     bool FOpenXRHMDModule::TryCreateInstance

Source code excerpt:

			// An extension we requested is not supported, but we normally only add extensions that must be supported and extensions that were listed to us by the runtime, so how did we get into this situation?
			// A badly behaving layer might add an extension into the available extensions list, but then not remove it before the runtime sees that list causing the runtime to fail instance creation with XR_ERROR_EXTENSION_NOT_PRESENT.
			// Therefore we have a ProblematicOpenXRApiLayerInfos config setting to define layers that might give us bad extensions which we can then try to create an instance without.

			// Read the ini.  This code can run so early that we cannot use a default object to load this more easily.
			TArray<FProblematicOpenXRApiLayerInfo> ProblematicOpenXRApiLayerInfos;
			{
				TArray<FString> ProblematicOpenXRApiLayerInfoStrings;
				GConfig->GetArray(TEXT("OpenXR"), TEXT("ProblematicOpenXRApiLayerInfos"), ProblematicOpenXRApiLayerInfoStrings, GEngineIni);
				ProblematicOpenXRApiLayerInfos.Reserve(ProblematicOpenXRApiLayerInfoStrings.Num());
				for (FString& Str : ProblematicOpenXRApiLayerInfoStrings)
				{
					ProblematicOpenXRApiLayerInfos.Emplace(Str);
				}
			}

			if (ProblematicOpenXRApiLayerInfos.Num() > 0)
			{
				// Copy the currently active ProblematicLayerInfos that have ExtensionsAddedToFallbackWithout into a new array.
				TArray<const FProblematicOpenXRApiLayerInfo*> ActiveProblematicLayerInfos;
				{
					TArray<XrApiLayerProperties> ActiveLayerProperties;
					EnumerateOpenXRApiLayers(ActiveLayerProperties);

#Loc: <Workspace>/Engine/Plugins/Runtime/OpenXR/Source/OpenXRHMD/Private/OpenXRHMDModule.cpp:894

Scope (from outer to inner):

file
function     bool FOpenXRHMDModule::TryCreateInstance

Source code excerpt:

						ActiveLayerPropertyNameMap.Add(ActiveLayerProperties[i].layerName, ActiveLayerProperties[i].layerVersion);
					}
					for (const FProblematicOpenXRApiLayerInfo& ProblematicLayerInfo : ProblematicOpenXRApiLayerInfos)
					{
						// Skip if no extension specified.
						if (ProblematicLayerInfo.ExtensionAddedToFallbackWithout.Len() == 0)
						{
							continue;
						}