-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C#: Area3D node error calling from signal "input_event" - Method not found #67009
Comments
CC @godotengine/dotnet Didn't check but a potential cause of this error is if the callback parameters don't properly match what is expected by the signal. I don't know if If this is the problem, we really need to improve the error message to point out when the method name is correct but the signature isn't. |
To add some details the signature of the current method is the one generated automatically from the Godot editor |
Signals currently only support 64-bit types so the |
I confirm that updating the method signature to the following fix the private void _on_area_3d_input_event(Variant camera, Variant @event, Vector3 position, Vector3 normal, long shape_idx)
{
GD.Print("collision event");
} Strong typing also works good : private void _on_area_3d_input_event(Camera3D camera, InputEvent @event, Vector3 position, Vector3 normal, int shape_idx) Keeping an private void _on_area_3d_input_event(Variant camera, Variant @event, Vector3 position, Vector3 normal, int shape_idx) Things to improve :
|
We used For the |
Should we split the I would like to try fixing that one if it's ok, as I think it would be a nice candidate for a first contribution |
There is an open issue we can use to keep track of that: #35910 I don't think it would be an easy fix for a first contribution, it likely requires changing |
Godot version
v4.0.beta2.mono.official [f8745f2]
System information
Windows 11 x64
Issue description
I made a simple 3D Scene with an Area3D node to detect mouse movement with a CollisionShape3D.
When registering the
input_event
signal inside a C# script and I hover my mouse over the CollisionShape it try to fire theinput_event
signal but doesn't find the method associated to it and spam this error :Steps to reproduce
input_event
signal binded to it with the following code :Minimal reproduction project
Area3DInputEventBug.zip
The text was updated successfully, but these errors were encountered: