Child scene TextureButton not working

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By alwaysusa

I have a scene (elevator_panel.tscn) that includes a few texture buttons. If I run that scene on it’s own, the texture buttons work as expected. When I place an instance of that scene into my elevator scene (that includes sprites, collision, area triggers etc), it also works.

But when I then drop that into my main scene, the buttons no longer work (no hover/pressed behavior).

I’m not sure why the elevator_panel would work when it’s a child of one scene, but not the other. The only thing I can think of is that my main scene has a canvas layer I’m using for the HUD. I wonder if there’s some rule that texture buttons in a scene that already has a canvas layer have to be part of it or something?

Meh, i did a poor job explaining it, but if you’ve seen this before and know of an answer, I’d appreciate it.


:bust_in_silhouette: Reply From: alwaysusa

Ah figured it out. It was the canvas layer. I had to set it to ignore mouse (it was blocking it).

:bust_in_silhouette: Reply From: cronodia

I know that you answered your own question, but in case any other dev gets here: The best way to determine what exactly “has been clicked” is by using the “clicked control” part of the debugger.

1.- Run your scene using the play button (top right corner), move it to another monitor/place so it doesn’t bother you.
2.- While the scene is running, on the Godot editor window look for the “output”, and click on “debugger” (see pic below)
3.- Inside the debugger, look for the last tab “misc”, there you will find useful information (take special notice of the “clicked control” input), click on any place on the scene you’re trying to debug to test it, each time the user clicks on a clickable node, you will find the info there.

Good luck