Hi everyone,
After upgrading my project from Unity 2021 to Unity 2022, I’ve encountered an issue where the colors in my PolyMesh appear incorrect. The old color values were serialized in a different format, and I need to convert them to the new format required by Unity 2022.
Here’s an example of the old serialization format:
- target: {fileID: 5374454402836207861, guid: db63478ce07ba4364ba24cae8588c5fe, type: 3}
propertyPath: m_PolyMesh.colors.Array.data[9].rgba
value: 4278190335
objectReference: {fileID: 0}
And the new format looks like this:
- target: {fileID: 5374454402836207861, guid: db63478ce07ba4364ba24cae8588c5fe, type: 3}
propertyPath: m_PolyMesh.colors.Array.data[0].r
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5374454402836207861, guid: db63478ce07ba4364ba24cae8588c5fe, type: 3}
propertyPath: m_PolyMesh.colors.Array.data[0].g
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5374454402836207861, guid: db63478ce07ba4364ba24cae8588c5fe, type: 3}
propertyPath: m_PolyMesh.colors.Array.data[0].b
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5374454402836207861, guid: db63478ce07ba4364ba24cae8588c5fe, type: 3}
propertyPath: m_PolyMesh.colors.Array.data[0].a
value: 1
objectReference: {fileID: 0}
Is there a way to automatically convert these old color values to the new format during the prefab import process? Any scripts or tools to help with this would be greatly appreciated!