Button component’s script is missing on documentation. Does anyone know how to change the state of button to make it active or deactivate?
I’ve tried “element.button.active” and some variations but couldn’t find it.
Button component’s script is missing on documentation. Does anyone know how to change the state of button to make it active or deactivate?
I’ve tried “element.button.active” and some variations but couldn’t find it.
I saw this document page but i need script referance which redirects me to this page :
https://developer.playcanvas.com/en/engine/api/pc.ButtonComponent.html
And it displays not found, i need to know how to reach button properties on scripting interface.
Try console.log() the entire button entity to see what structure.
Yeah, i’ve just found it with this way. Thank you.
It’s under entity object.
this.entity.button.active