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

C# Wrapper #375

Open
Renari opened this issue Feb 28, 2025 · 0 comments
Open

C# Wrapper #375

Renari opened this issue Feb 28, 2025 · 0 comments
Labels
🌺 enhancement New feature or request 🧪 unit-tests-required Related to writing unit tests.

Comments

@Renari
Copy link

Renari commented Feb 28, 2025

Is your feature request related to a problem? Please describe.
Currently to call phantom camera methods in C# you have to do something like this:

var action = GetNode("BeehaveTree").Call("get_running_action");

Currently to use beehave in a C# project requires calling GetNode("node").Call("xxx") with strings functions names. This is prone to causing runtime issues, for example if beehave changed a method this would still compile in C#.

Describe the solution you'd like
Beehave could ship a C# wrapper that would prevent the above from happening.

Additional context
One such example:
https://github.com/Portponky/better-terrain/blob/main/addons/better-terrain/BetterTerrain.cs

var action = GetNode<BeehaveTree>("BeehaveTree").getRunningAction();

This also heavily eases use within IDE, because through this wrapper we can use known type declarations instead of everything coming through as GodotObjects.

@bitbrain bitbrain added 🌺 enhancement New feature or request 🧪 unit-tests-required Related to writing unit tests. labels Mar 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌺 enhancement New feature or request 🧪 unit-tests-required Related to writing unit tests.
Projects
None yet
Development

No branches or pull requests

2 participants