Fixed PhysX and Blast creation of default config files (#4497)

- Avoid saving blast global configuration unnecessarily every time the editor is opened.
- Fixed how to obtain the default physics material library. The relative path needs to be from the project folder, not the asset folder inside the project. It was also missing saving the physx configuration after a the default library is assigned to it.
- Fixed asset id for physics material asset 'assets/physics/surfacetypemateriallibrary.physmaterial'

Signed-off-by: moraaar moraaar@amazon.com
This commit is contained in:
moraaar
2021-10-06 09:46:04 +01:00
committed by GitHub
parent 3eb3df6923
commit 606ba45cf2
11 changed files with 63 additions and 20 deletions
@@ -511,10 +511,12 @@ namespace PhysX
materialLibrary.BlockUntilLoadComplete();
AZ_Warning("PhysX", (materialLibrary.GetData() != nullptr),
const bool loadedSuccessfully = materialLibrary.GetData() != nullptr && !materialLibrary.IsError();
AZ_Warning("PhysX", loadedSuccessfully,
"LoadDefaultMaterialLibrary: Default Material Library asset data is invalid.");
return materialLibrary.GetData() != nullptr && !materialLibrary.IsError();
return loadedSuccessfully;
}
//TEMP -- until these are fully moved over here