Button Component active state

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.

Try this: https://developer.playcanvas.com/en/user-manual/packs/components/button/

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.

1 Like

Yeah, i’ve just found it with this way. Thank you.

It’s under entity object.

this.entity.button.active

1 Like