Mesh Renderers become invisible when animating material properties

If you attach any sprite-based shader material to a Mesh Renderer, e.g. A material that uses the “Sprite-Lit-Default” shader, and then try to animate any material property on it, the whole Mesh Renderer suddenly goes invisible.

The shader will work as expected when there is no animator on the Mesh Renderer Game Object and be visible, but just suddenly go invisible as soon as an animation clip that touches any shader properties is used.

I created a project here to show the problem: unity-6-mesh-renderer-anim-issue/README.md at main · DeanIsseyegh/unity-6-mesh-renderer-anim-issue · GitHub

I made a Bug Report to Unity yesterday (IN-92544) so still waiting on updates with that.

Note: This didn’t happen in Unity 2021, which is the version I’m upgrading from.

I wonder if this is related to this issue I posted the other day:

Maybe animating the material removes it from batching, and then the MeshRenderer fails to render due to the unset unity_SpriteColor / unity_SpriteProps properties.

A fix for this bug should be coming out today.

The issue I reported got merged with this one:

Oh cool! Hopefully it’s fixed!