-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
Adding Godot 4 Support #2
Comments
After a lot of confusion, I was able to build a library for godot 4. But I haven't even tried to display anything yet. At the moment I can't even register any function with pointers. Some of these functions can be ignored, but the problem still remains. I also need to rethink how to initialize the displaying of everything. Previously, a node was simply created, now I want to use a singleton that is not added to the scene... upd. At the moment I can't even set the value of a boolean variable.. Perhaps I'll wait until GDExtension works more stably. |
I think this will be extremely useful, so I would very much look forward to Godot 4 support :D |
@DmitriySalnikov I wanted to try out the CI build but get this error, any ideas why?(https://github.com/DmitriySalnikov/godot_debug_draw_3d/actions/runs/3688845973) |
@wp2000x As I mentioned in the comment to this commit 7133097, you need a newer version of Godot. Beta 8 doesn't include this change yet. I will try to fix them as soon as I solve the problem with a completely broken and reinstalled Windows... |
Everything looks fine now.
And most likely I missed something else. Plus, for a successful build, you need to apply 2 patches (the corresponding Pull Requests have already been created for them godotengine/godot-cpp#950 godotengine/godot-cpp#956). Examples and libraries updated in the master branch (requires beta9). |
I think the C# interface needs also a bit of work, because it does not run anymore out of the box on Godot 4? (DebugDrawCS.cs) Edit: In the meantime, i tried to do a hacky fix up for DebugDrawCS.cs and creating a instance of the GD Extenstion via ClassDB with |
I haven't started working on the C# wrapper yet. I just decided not to delete this godot_debug_draw_3d/addons/debug_draw_3d/DebugDrawCS.cs Lines 9 to 13 in d6b0fd7
I'll see what I can do about it later. I need to check how C# code generators work and whether they can generate code from |
Great! Im waiting eagerly, so that i can re-intergrate it into my GD4 C# project. Any ETA? 😄 |
I found that it is possible to do so https://www.reddit.com/r/godot/comments/zlglpk/comment/j081fkm/?utm_source=share&utm_medium=web2x&context=3 At the moment I want to add a small optimization of instances data transfer to Godot. And it would also be interesting how difficult and whether it is even possible to add support for other C++ libraries (use |
Ah, good to know, that the mono glue generator also tries to generate it for extenstions. I also found this: https://github.com/antonWetzel/GDExtensionCSharp maybe it will help you as a base for a binding generator. |
If I understand correctly, this is not what I need. Here the developer makes an alternative to |
"Simple" instructions for API generation:
I hope I didn't miss anything. But I don't like this solution. Maybe if you have a lot of |
Nice! Will test it out. Would it maybe make sense to ship a pre-generated nuget for every DebugDraw version release on nuget.org for this approach? Edit: Ah i see now the problem, its one big glue package. I build the Nugets successfuly, and verified that debugdraw is in there, but the project refuses to use those nugets. The local nuget source is there but the DebugDraw interface classes are not recognized. Deleting Would it maybe be possible to separate the DebugDraw assembly part from the glue and make it as a standalone dll/nuget? |
I also faced this and struggled with it for a while. Clearing all caches and recreating the C# project helped me (maybe I did something else). I have already asked a question in godot's RocketChat about generating an API for GDExtension, but there has been no answer yet. Most likely I will have to write a proposal. But unfortunately I can't develop the project yet. My PC's PSU failed and I'm without a PC until at least February 3rd. But if you manage to use local nuget packages, then you can safely use them, because I will try to make the generator as close as possible to the Godot generator. And most likely it will be just a .cs file inside your project again. |
I tried further, but still the same. Guess i will wait for your API generator. |
I tried several options with changing the original generator to support I want to release a GDScript-only version first. And if no one has created a proposal yet, then I need to write it as well. |
I think the porting is complete. |
This could be a possible way to deal with GDExtensiong binding for c# based on ideas from LibGodotSharp |
@GeorgeS2019 I noticed only a copy paste of my solution there, the rest will not help me in any way. But if I understood everything correctly, then you have confused
I would say that |
Do you mean compiling the entire C# interop code only with my bindings ( In the first case, it seemed to me that Do you already have a ready-made prototype with the implementation of your ideas? I would be interested to see it. |
@DmitriySalnikov |
Isn't this a "standard" fix for casting Objects from an internal Godot type to an external GDExtension or C#? (they just tried to fix it several times already) |
antonWetzel/GDExtensionCSharp#1 (comment) namespace GDMP {
class SomeCoolObject {
private GD.Object data;
public SomeCoolObject() { this.data = GD.Instantiate("GDMPSomeCoolObject"); }
public SomeType SomeFunction() {
return (SomeType)this.data.call("some_function");
}
}
} |
Now I am not sure that it is even possible to make such bindings now. |
too much off topic |
No description provided.
The text was updated successfully, but these errors were encountered: