Add additional check to check material library is loaded when trying to retrieve names (#6165)
* Add additional check to ensure material library is loaded when trying to retrieve names. Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com> * Mark physmaterial assets as critical Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com> Co-authored-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com> Signed-off-by: moraaar moraaar@amazon.com
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
@@ -442,6 +442,7 @@
|
||||
"RC physmaterial": {
|
||||
"glob": "*.physmaterial",
|
||||
"params": "copy",
|
||||
"critical": "true",
|
||||
"productAssetType": "{9E366D8C-33BB-4825-9A1F-FA3ADBE11D0F}"
|
||||
},
|
||||
"RC ocm": {
|
||||
|
||||
Reference in New Issue
Block a user