Skip to content
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

Provide proper generated C# bindings #386

Open
lw64 opened this issue May 26, 2024 · 5 comments
Open

Provide proper generated C# bindings #386

lw64 opened this issue May 26, 2024 · 5 comments
Labels
enhancement New feature or request low priority Low Priority
Milestone

Comments

@lw64
Copy link
Contributor

lw64 commented May 26, 2024

Description

Currently to access Terrain3Ds API from C# you need to go over ClassDB and other functions to convert between C# and Godot objects. This is not very convenient for cases like generated Terrain based on code.

This project here seems to have a class that can generate csharp bindings from the godot scripting API: https://github.com/DmitriySalnikov/godot_debug_draw_3d/blob/master/src/editor/generate_csharp_bindings.h

I think that could be integrated.

@TokisanGames
Copy link
Owner

@TokisanGames TokisanGames added enhancement New feature or request low priority Low Priority labels May 26, 2024
@TokisanGames TokisanGames added this to the Future milestone May 26, 2024
@TokisanGames TokisanGames moved this to 1.0-Stable in Terrain3D Roadmap May 26, 2024
@Sythelux
Copy link

I tried to generate C# bindings with Delsin-Yu's Generator. It will not work out of the box. So I had to customize and fix some things.

That is also why I made the pull request against the 0.9 version, and not against the master. I don't want to have broken nightly builds because of the generator.

scrolling through the original CSharp-Wrapper-Generator-for-GDExtension it has a couple of addons placed into the addons folder which apparently get all automatically generated I'm not sure if it is worth to provide terrain3D to them actually.

I'll evaluate a couple of things. I don't want to put more work onto your shoulders and to have broken C# bindings automatically generated and no way to evaluate them is an issue.

@TokisanGames
Copy link
Owner

Example bindings for Terrain3D in #454

@ChristopherHaws
Copy link

Not trying to be pushy or anything seeing as this is a free, open source project! I also work on open source in my free time so I know it is a ton of hard work! 💙

Having said that, I am curious why the readme claims Can be accessed by GDScript, C#, and any language Godot supports when this doesn't seem to be the case? As far as I can tell, I am not able to access any of Terrain3D's types from C#... Am I missing something? Is there a nuget package with bindings I need to install or something?

@TokisanGames
Copy link
Owner

@ChristopherHaws There's a whole page that shows you how to access it from other languages. We have many C# users.
https://terrain3d.readthedocs.io/en/latest/docs/programming_languages.html

This issue documents that there are no bindings, and no process setup to automatically generate them. I don't use C# so am not going to maintain them manually. This issue will remain open until there's an automatic process to produce them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request low priority Low Priority
Projects
Development

No branches or pull requests

4 participants