godot_debug_draw_3d icon indicating copy to clipboard operation
godot_debug_draw_3d copied to clipboard

C# bindings generator

Open Gamerfiend opened this issue 1 year ago • 7 comments

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

Gamerfiend avatar Sep 29 '23 23:09 Gamerfiend

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

DmitriySalnikov avatar Sep 30 '23 01:09 DmitriySalnikov

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?

Gamerfiend avatar Sep 30 '23 02:09 Gamerfiend

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).

DmitriySalnikov avatar Sep 30 '23 02:09 DmitriySalnikov

@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

GeorgeS2019 avatar Mar 12 '24 08:03 GeorgeS2019

@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.

DmitriySalnikov avatar Mar 12 '24 14:03 DmitriySalnikov

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

MikeSchulze avatar Mar 12 '24 16:03 MikeSchulze

@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 avatar Mar 12 '24 16:03 GeorgeS2019

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

GeorgeS2019 avatar May 02 '24 07:05 GeorgeS2019