I have an entity (a button) with a child entity (some text) attached. I want to change the colour of the childs text from within the main entities script. I tried:
myButton.children.element.color = new pc.Color(0,0,0);//black
But I get the error: Cannot set property ‘color’ of undefined
Am I doing something obviously wrong here? Is this not how to access child elements?