Skip to content

Can't animate shader uniform after disabling node #19033

@pennMikeGoldberg

Description

@pennMikeGoldberg

Cocos Creator version

3.8.7

System information

Mac, Android, iPhone

Issue description

After disabling and enabling a node, playing an animation that sets a shader uniform property no longer works.

I added a video of the bug and screenshot of the animation setup. In the video you can observe that hover and pressed play an animation which:

a. scales a sprite
b. sets a u_Darken uniform property to dim the sprite

After toggling the node to be active = false, then active = true. You'll see the scale property still animates, but the dimming (via the shader property) no longer works.

Image
Screen.Recording.2025-10-01.at.2.33.49.PM.mov

Relevant error log output

No response

Steps to reproduce

  1. Create a sprite
  2. add a shader material
  3. create 2 animations, where each animation sets a shader property to a different value
  4. create a component/script that plays one animation on mouse enter, and another on mouse leave
  5. create a separate node that's just a button with a component that lets you toggle active to true/false on the sprite

a. observe on first load, the sprite will animate the shader property on mouse enter
b. set the sprite to inactive/active
c. observe the mouse enter/leave animations no longer set the shader property

Minimal reproduction project

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugNeeds TriageNeeds to be assigned by the team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions