enumerateInstanceExtensionPropertiesToVector can be usefull to check whether openXR libraries are installed on user's PC. Like this:
!xr::enumerateInstanceExtensionPropertiesToVector(nullptr).empty();
But the assert inside ruins this solution and the same logic, so an option using more lines of code is commonly used:
uint32_t property_count = 0;
auto result = xr::enumerateInstanceExtensionProperties(nullptr, 0, &property_count, nullptr);
return XR_SUCCEEDED(result) && property_count != 0;
The suggestion is to remove redundant assert
enumerateInstanceExtensionPropertiesToVectorcan be usefull to check whether openXR libraries are installed on user's PC. Like this:But the assert inside ruins this solution and the same logic, so an option using more lines of code is commonly used:
The suggestion is to remove redundant assert