diff --git a/Gems/WhiteBox/Code/Source/Rendering/Atom/WhiteBoxAtomRenderMesh.cpp b/Gems/WhiteBox/Code/Source/Rendering/Atom/WhiteBoxAtomRenderMesh.cpp index 9aa29cb288..8ceb95e3a7 100644 --- a/Gems/WhiteBox/Code/Source/Rendering/Atom/WhiteBoxAtomRenderMesh.cpp +++ b/Gems/WhiteBox/Code/Source/Rendering/Atom/WhiteBoxAtomRenderMesh.cpp @@ -119,9 +119,16 @@ namespace WhiteBox modelLodCreator.BeginMesh(); modelLodCreator.SetMeshAabb(meshData.GetAabb()); - // set the default material - auto materialAsset = - AZ::RPI::AssetUtils::LoadAssetByProductPath(TexturedMaterialPath.data()); + const AZ::Data::AssetId materialAssetId = + AZ::RPI::AssetUtils::GetAssetIdForProductPath(TexturedMaterialPath.data(), AZ::RPI::AssetUtils::TraceLevel::Warning); + + auto materialAsset = AZ::Data::AssetManager::Instance().FindAsset(materialAssetId, AZ::Data::AssetLoadBehavior::Default); + if (!materialAsset) + { + // set the default material + materialAsset = AZ::RPI::AssetUtils::LoadAssetById(materialAssetId); + } + if (materialAsset) { modelLodCreator.SetMeshMaterialAsset(materialAsset);