• Bugs
  • The material instance is reset to the original material

I'm using an instanced material to apply color adjustment to the character (using the Vertex Lit shader).
Each time the character's animation changes an attachment, like blinking eyes or talking, the instanced material is reset to the original material, thus covering the color adjustment.

To show the problem clearly, I record the talking animation, and set the instanced material overlay color to red.
You can see the material is covered with the original material when the mouth attachment is changing, causing the character to flash.

Изображение удалено из-за отсутствия поддержки HTTPS. | Показать

Изображение удалено из-за отсутствия поддержки HTTPS. | Показать

Изображение удалено из-за отсутствия поддержки HTTPS. | Показать

How to fix the problem?
Thank you!

Related Discussions
...
  • Изменено

Please do not directly set Materials at your SkeletonRenderer components, as they are overwritten when Attachments or draw order changes.

Instead you can use one of the two ways documented here:
spine-unity Runtime Documentation: Changing Materials Per Instance

In case you don't want to change them programmatically but only once in the Unity Editor, you can use the SkeletonRendererCustomMaterials component.