beehave icon indicating copy to clipboard operation
beehave copied to clipboard

C# Wrapper

Open Renari opened this issue 10 months ago โ€ข 4 comments

Currently to call Beehave 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#.

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.

Renari avatar Feb 28 '25 02:02 Renari

I bumped on the addon and wanted to ask simmilar question, if C# is supported

Maybe its better (for performance reasons) to reimplement Beehave on C# in parralel? As second, independent addon

I need it, so I might give a hand, if author supports contributions...

ilievmark avatar May 12 '25 07:05 ilievmark

I'm also looking for a C# version of this, I belive another plugin would be better than having wrappers around this one.

conde2 avatar Aug 12 '25 10:08 conde2

I actually found https://github.com/bitbrain/beehave/discussions/280 that already mentions a C# port. The developer stated that the plan is to convert Beehave into a GDExtension, which would allow it to support both C# and GDScript from a single C++ codebase. However, I haven't been able to find that C++ version.

riyuejiuzhao avatar Nov 05 '25 14:11 riyuejiuzhao

https://github.com/bitbrain/beehave/discussions/285 it's mentioned here with repo links

Renari avatar Nov 05 '25 15:11 Renari