godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.34k stars 21.06k forks source link

Creating a signal with an argument tries to link it before automatically making the function. #95633

Open Koomball opened 2 months ago

Koomball commented 2 months ago

Tested versions

Occurred in:

System information

Godot v4.3.stable - Windows 10.0.19045 - GLES3 (Compatibility) - Intel(R) HD Graphics 620 (Intel Corporation; 31.0.101.2111) - Intel(R) Core(TM) i5-7300U CPU @ 2.60GHz (4 Threads)

Issue description

When creating a signal with an argument and letting it automatically create the function in the linked script it gives this error right before creating the function. Cannot connect to 'focus_entered': the provided callable is not valid: Node2D(node_2d.gd)::_on_button_focus_entered

Upon attempting to make the signal again it wont give the error and correctly adds the signal, My guess is something is making it check if the function exists before it makes it.

Attached is a video of me recreating this bug but i forgot to record the signal creation screen, in the screen all i do is add a bool argument.

https://github.com/user-attachments/assets/678d0a19-4747-4d2a-8ded-cdba77dea08e

Steps to reproduce

  1. Create something a signal can be added to.
  2. Link a script to your node.
  3. Create a signal with an argument of any kind.

Minimal reproduction project (MRP)

N/A

AThousandShips commented 2 months ago

Please show the complete workflow, you are skipping potentially important steps

AThousandShips commented 2 months ago

You didn't upload, you need to wait until it's finished uploading

Koomball commented 2 months ago

https://github.com/user-attachments/assets/90f76449-cb55-47c6-90e8-b25371b43ec0