[SOLVED] element.color.set not working


#1

https://playcanvas.com/editor/scene/671855

Changin colors of elements on runtime seems broken.

this.entity.element.color.set(0,0,0);
Not working


#2

Instead of doing:

this.entity.element.color.set(0,0,0);

Do:

this.entity.element.color = new pc.Color(0, 0, 0);

When you update the properties of any component, you need to use an assignment operator, or the component will not know that the property has been updated.