Stumbled upon this and am hoping to find an answer from the more knowledgeable members of the community. I have a project that is packaged with only DX10 and OpenGL (i.e. SM4) selected as the targeted RHIs. But when I run it it complaints about not finding cooked content for SM5.
I can still run it if I pass -d3d10, -opengl, or -sm4 as the command line argument but it makes little sense. Isn’t the engine supposed to figure out the best RHI to invoke when the game starts? What’s the point of packaging for multiple RHIs if it doesn’t?
My original issue was the game packaged with support for DX11, DX10, and OpenGL RHIs not starting for users with DX11 that doesn’t have feature level 10. And forcing the project to only use DX10 and OpenGL is a stupid limitation even if I can make that happen. But I feel like I’m missing some important logic with multiple targeted RHIs. Any advice would be highly appreciated.
You are thinking about how it runs backwards. The Project when launched looks at the capabilities of the CPU/GPU it is running on and if your CPU can run SM5, the project tries to run that RHI unless you have given it a command line prompt to not do it. This is the reason that you are getting the message you are seeing now.
As far as the original issue, I would need to know a little more about how you are packaging and what message you are getting when you try to open the packaged project.
Does it make sense for the engine to run SM5 if the project has been packaged exclusively with SM4 RHIs? I’d say “no” and perhaps that’s the source of my confusion.
Originally the message was “DX11 feature level 10.0 is required to run the engine” and the project has been packaged with only DirectX 11 (SM5) and DirectX 10 (SM4) options checked under Platforms - Windows. UE4 v4.10.0. If any other details could help then let me know.
Obviously it would be much better if the engine accounted for the project settings and didn’t even try running the SM5 code path if the project was set up exclusively for SM4 RHIs. And even better if the engine could be smarter about the lack of the required DX11 feature level and would fall back to DX10 RHI if the project was set up for both DX11 and DX10 RHIs.
On engine startup, the highest RHI that is supported on the loading computer will always be loaded. I have entered a feature request to allow the engine to check the project settings on targeted hardware settings based on packaging. It should be noted that this would effect the editor as well. I will keep you informed as the engineers look at the feasibility of implementation, for reference UE-27059.