func _mouse_enter() only goes off when in debugger, not the editor.

Godot Version

4.3 stable

Question

When using a @tool script to detect _mouse_enter, it only works in the debugger.
I create the object that should detect _mouse_enter here:

ControlPointsList[i][j] is a MeshInstance3D. The Collider (stored in a variable of the same name in the above code) is given the “ControlPointScript” which looks like this:

When I test this in the debugger it works, but in the editor it refuses to register.

Things I have done:
Scour the docs
Scour the internet
Ask on discord:


(/|\ If that’s why, why does it work in debug mode)

I feel like I’m gonna feel really stupid for asking once this question is answered sufficiently, but I seriously have no idea at this point. Please help!

Have you connected the signals to the script?

Little confused here. What do you mean tested in debugger? @tool scripts do not support debugging.

Sorry, I was referring to running the project, which @tool scripts do alongside running in the editor.

Assuming it doesn’t happen automatically, no. Why would I need to if it’s working when I run the project? Does it connect automatically when the project is run, but not when the editor boots up?

Note that the script checking for mouse entered is running in the static body, so looking at the documentation for connect(), it doesn’t seem to help me here.