GodotVR / godot-xr-tools

Support scenes for AR and VR in Godot
MIT License
471 stars 64 forks source link

button_pressed and button_released signals of InteractableAreaButton always generate errors #618

Closed BrokAnkle closed 4 months ago

BrokAnkle commented 4 months ago

The button_pressed and button_released signals send this error when emited:

interactable_area_button.gd:87 @ _on_button_entered(): Error calling from signal 'button_pressed' to callable: 'Node3D(Button.gd)::on_button_pressed': Cannot convert argument 1 from Object to NodePath.
  <C++ Source>   core/object/object.cpp:1140 @ emit_signalp()
  <Stack Trace>  interactable_area_button.gd:87 @ _on_button_entered()

By changing emit(self) by emit(get_path()) it resolve the problem but I don't know if this is correct.

Malcolmnixon commented 4 months ago

Could you provide a bit more information. The complaint is indicating a mismatch with some "on_button_pressed" handler in a Button.gd file - could you provide the code of that callback function?

BrokAnkle commented 4 months ago

image Yes sorry it was in fact my callback and not the signal the problem, for some reason I typed the "button" argument as a NodePath instead of a Variant. I was confused looking at the code that has a "button" variable wich is a NodePath.