-
-
Notifications
You must be signed in to change notification settings - Fork 21k
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
the connect method flags in c# #74829
Comments
I suggest this flags become an enum and in the body of the connect function cast it to a unit. |
I think this is resolved in 4.0. |
Yes, In version 4 this problem was fixed by adding the
Also, I see this code in my visual studio editor, but I cannot find it in the git repository.
|
I want to help and contribute to the Godot engine, If it's possible tell me about how I can fix this issue and where is the connect method to change its signature? |
That method is generated from the original declaration in https://github.com/godotengine/godot/blob/master/core/object/object.cpp#L1232 there the arg would need to be changed to |
I think this change need a major update which will go to version 5. |
Can't we change ConnectFlags to be a |
Changing the underlying type of the Adding a method overload that takes the So, if we decide to break source compatibility we can fix this in Godot 4.x, no need to wait for 5.0. We would change the Footnotes
|
This sort of tiny targeted change seems like a perfect time to cut my teeth on the engine source code. Can you explain further what the “compat” method would be? The idea is to change the signature of the main one to take the enum, right? Wouldn’t the compat method cause the ambiguity you mentioned? |
A compat method is a method with the signature of the old method, it's bound using
Yes, in C# the compat method is just an overload with the old signature, so it would cause ambiguity. But this ambiguity is only a source breaking change so maybe it's worth breaking compat for this, not sure. Before you do anything, I'd advise waiting for a decision to be made. I'd like to know what @godotengine/production thinks of breaking source compatibility for this. Footnotes
|
Godot version
3.5.1
System information
Windows 10
Issue description
The connect method in c# does not have any type a flag parameter which is hard to know and code it. This hard to code because this parameter only gets unit and does not contain any information the flags value. you can see in this sample
Steps to reproduce
start to coding with c# and use connect method.
Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered: