Can anyone help me? After updating to 4.25, any materials located in separately mounted pak files are not rendering properly. I am only seeing the default material. Materials found in Content\Paks[myproject]-WindowsNoEditor.pak work no problem, but not those found in separately mounted pak files. Everything worked fine in 4.23.4 and all versions prior. Any help is great appreciated.
Here is the mount function I am using:
if (FCoreDelegates::OnMountPak.IsBound())
{
// Mount pak
FPakFileVisitor Visitor;
if (FCoreDelegates::OnMountPak.Execute(PakPath, 4, &Visitor)) //0-4; specifies search order
{
UE_LOG(MyLog, Log, TEXT("Pak Mounted Correctly"));
}
}
As a test, I mounted a pak file with 1 unique material named M_TestMaterial. This works fine in 4.24.3 but I am guessing something changed in 4.25. Here is the error it generated:
LogShaders: Error: Missing shader resource for hash āCC82171EE3D12616F2284E1AE3F5E5B6373A9F22ā for shader platform 0 in the shader library
LogMaterial: Error: Tried to access an uncooked shader map ID in a cooked application
LogMaterial: Warning: Invalid shader map ID caching shaders for āM_TestMaterialā, will use default material.
LogMaterial: Canāt compile M_TestMaterial with cooked content, will use default material instead
LogMaterial: Warning: /Game/MyMaterials/M_TestMaterial.M_TestMaterial: Failed to compile Material for platform PCD3D_SM5, Default Material will be used in game.
probably cant find the texture files anymore as link to file path probably gets broken in the upgrade? just my guessā¦ i noticed with blueprints a different node needs to be used in different versions and changes need to be made to allow the same result from a previous version of the editorā¦ in C++ maybe you need to switch a couple of lines to different wording to accomidate the changes made to the engine over the years.
For anyone facing this problem, after a fortnight of searching I finally found the problem.
If you are building an application and DLC pakās that the base application will download, make sure that you DESELECT āShare Material Shader Codeā in the packaging section of the project settings.