TokisanGames / Terrain3D

A high performance, editable terrain system for Godot 4.
MIT License
2.02k stars 115 forks source link

Provide proper generated C# bindings #386

Open lw64 opened 3 months ago

lw64 commented 3 months ago

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 commented 3 months ago

Automated Wrapper f/ C# https://github.com/Delsin-Yu/CSharp-Wrapper-Generator-for-GDExtension

Sythelux commented 1 month ago

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 commented 1 month ago

Example bindings for Terrain3D in #454