Made material property auto-rename procedure apply to Material Component at runtime. This ensures that an material property overrides and any gameplay scripts that work with property overrides can get the benefit of the material type version update procedure.

I added an ApplyPropertyRenames function to MaterialTypeAsset very similar to the one in MaterialTypeSourceData.
Updated the MaterialAssignment class to apply any property renames when it discovers the old name doesn't work. This will be written to disk when the level or prefab is saved.

Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
This commit is contained in:
santorac
2021-10-21 23:18:08 -07:00
parent a55d94217c
commit c6b209ace0
7 changed files with 172 additions and 1 deletions
@@ -0,0 +1,17 @@
{
"description": "",
"parentMaterial": "",
"materialType": "TestData/Materials/Types/MinimalPBR.materialtype",
"materialTypeVersion": 3,
"properties": {
"settings": {
"color": [
0.08522164076566696,
0.11898985505104065,
1.0,
1.0
],
"roughness": 0.33000001311302185
}
}
}