Bladeren bron

Merge pull request #6050 from aws-lumberyard-dev/daimini/physicsMaterialNameCrash

Add additional check to ensure material library is loaded when trying to retrieve names.
moraaar 3 jaren geleden
bovenliggende
commit
8f4ff91915
2 gewijzigde bestanden met toevoegingen van 3 en 1 verwijderingen
  1. 2 1
      Gems/PhysX/Code/Source/Pipeline/MeshGroup.cpp
  2. 1 0
      Registry/AssetProcessorPlatformConfig.setreg

+ 2 - 1
Gems/PhysX/Code/Source/Pipeline/MeshGroup.cpp

@@ -864,7 +864,8 @@ namespace PhysX
         {
             if (auto* physicsSystem = AZ::Interface<AzPhysics::SystemInterface>::Get())
             {
-                if (const auto* physicsConfiguration = physicsSystem->GetConfiguration())
+                if (const auto* physicsConfiguration = physicsSystem->GetConfiguration();
+                    physicsConfiguration && physicsConfiguration->m_materialLibraryAsset)
                 {
                     const auto& materials = physicsConfiguration->m_materialLibraryAsset->GetMaterialsData();
 

+ 1 - 0
Registry/AssetProcessorPlatformConfig.setreg

@@ -457,6 +457,7 @@
                 "RC physmaterial": {
                     "glob": "*.physmaterial",
                     "params": "copy",
+                    "critical": "true",
                     "productAssetType": "{9E366D8C-33BB-4825-9A1F-FA3ADBE11D0F}"
                 },
                 "RC ocm": {