Added unit tests for the new functionality.
I found a mistake where MaterialAssetCreator needs to clear the raw data when configured to finalize the material asset. Since MaterialSourceData no longer relies on the material type source file at all, I was able to change MaterialSourceDataTest to avoid saving the source data to disk. Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
This commit is contained in:
@@ -48,6 +48,11 @@ namespace AZ
|
||||
m_asset->Finalize(
|
||||
[this](const char* message) { ReportWarning("%s", message); },
|
||||
[this](const char* message) { ReportError("%s", message); });
|
||||
|
||||
// Finalize() doesn't clear the raw property data because that's the same function used at runtime, which does need to maintain the raw data
|
||||
// to support hot reload. But here we are pre-baking with the assumption that AP build dependencies will keep the material type
|
||||
// and material asset in sync, so we can discard the raw property data and just rely on the data in the material type asset.
|
||||
m_asset->m_rawPropertyValues.clear();
|
||||
}
|
||||
|
||||
return EndCommon(result);
|
||||
|
||||
Reference in New Issue
Block a user