TimWhiting / godot_dart

2 stars 1 forks source link

How do I use this? #1

Open Ahmadre opened 3 years ago

Ahmadre commented 3 years ago

How can I use this plugin? Example folder is empty...

I want to use this to setup a 3D-Configurator.

Thanks :)

TimWhiting commented 3 years ago

I was trying to get this to work a while back using dart ffi, but ran into technical limitations in the fact that dart doesn't make it easy to embed in other runtimes. With dart ffi it is easy to embed C code in dart, but I'd have to know a lot more about the dart runtime to be able to start up the needed dart threads etc for the dart runtime from C. I know it is possible, but I have neither the time nor the need to do this right now unfortunately. This is why there are no examples and it is not published anywhere, in fact I thought I made this repo private.

Ahmadre commented 3 years ago

I was trying to get this to work a while back using dart ffi, but ran into technical limitations in the fact that dart doesn't make it easy to embed in other runtimes. With dart ffi it is easy to embed C code in dart, but I'd have to know a lot more about the dart runtime to be able to start up the needed dart threads etc for the dart runtime from C. I know it is possible, but I have neither the time nor the need to do this right now unfortunately. This is why there are no examples and it is not published anywhere, in fact I thought I made this repo private.

I figured it out: The problem for us is: we have simple scripts in Godot which are attached to simple nodes like AR/VR stuff and we want to call the methods from Flutter with passing data as args.

But I figured out that These rely only on GDNative/NativeScript where Godot's under the hood methods will be called.

So it's working, but not suitable for a real Godot Plugin for Flutter ☺️

I'm working on a Federated Plugin with Plugin-Interfaces to work with Native Calls like flutter-unity.

Thanks anyway :)