DmitriySalnikov / godot_debug_draw_3d

Draw 3D debug graphics and 2D overlays with this add-on.
https://dd3d.dmitriysalnikov.ru/
Other
451 stars 23 forks source link

C# bindings generator #25

Closed Gamerfiend closed 5 months ago

Gamerfiend commented 1 year ago

Feature description

Would it be possible to have this as a separate addon that could be used with others? Or how difficult would it be to use this with another addon? Sorry I know this is off-topic a bit but I don't know another way to discuss with you

Implementation Ideas

No response

DmitriySalnikov commented 1 year ago

Well, in order for this to work with other projects, I need to put the class names and the path to the output file in the arguments of the generate method. Also I haven't published some optimizations yet. And I use conditional compilation to disable bindings in the release build. Maybe I forgot something else. But the main question here is not how to separate it into a separate addon, but why is it needed in C++? I would prefer such a generator coded in GDScript or even in C#. It would be the most lightweight and cross-platform generator. In this addon [debug_draw_3d], I wanted to do everything in one DLL, so I used C++.

I could try to make a separate project for this, but now I am busy with another program for which I got some money...

A C# roadmap has also recently been published, which discusses updates to the binding generator. However, it is unknown when all this will be implemented. https://github.com/godotengine/godot-proposals/issues/7895

Gamerfiend commented 1 year ago

Yup, I saw your post on there and came over here to see what you had done! I do agree it would be best in GDScript more than likely or as a Python script maybe?

DmitriySalnikov commented 1 year ago

or as a Python script maybe?

My approach to generation uses classes and methods of Godot itself in real time. Therefore, it is possible to use only GDScript/C#/C++ (as well as third-party languages implemented through GDExtension).

GeorgeS2019 commented 6 months ago

@DmitriySalnikov

C# (Scene) Test-Driven-Development (TDD) using Godot4 in VS2022

https://youtu.be/JLI0cIYMgr0

using the latest gdUnit4API TestAdaptor from @MikeSchulze

https://github.com/godotengine/godot-proposals/assets/49812372/72bb91a1-dd1c-4467-8d07-3b0d3beadd4b

DmitriySalnikov commented 6 months ago

@GeorgeS2019 What do you expect from me? This project is written in C++, I think it would be more logical to write tests in C++. Although the entire API is already used in my scene with examples.

Please don't mention me in every issue related to C# or GDExtension. I don't want to deal with the official GDExtension binding generator for C#. In addition, they had plans for a complete restructuring of how C# works and all my edits are likely to be useless.

MikeSchulze commented 6 months ago

@GeorgeS2019 please do not spam repositories with this information, I didn't ask you to do that.

GeorgeS2019 commented 6 months ago

@MikeSchulze I truly believe more projects need to try that so that it is easy to share codes done in one project to the future projects

@DmitriySalnikov Sorry for the stress I caused. I thank you for what you have attempted

GeorgeS2019 commented 5 months ago

https://github.com/Delsin-Yu/CSharp-Wrapper-Generator-for-GDExtension