Skip to content

Line component is not updated when the color is modified in code (need to deactive and reactive the component) #16448

Description

@BenoitFreslon

Cocos Creator version

3.8.1

System information

Windows 11

Issue description

The Line component has a color property.
If you change the color the color is not updated in the view (only in the inspector)

image

Relevant error log output

No response

Steps to reproduce

Create a Node with a Line
Change the line.color in code.
The workaround is to

Deactive and reactive the node.

        this.line.node.active = false;
        this.line.node.active = true;

Minimal reproduction project

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

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