-
Notifications
You must be signed in to change notification settings - Fork 7
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
Design patterns for communicating with the embedded Godot app #5
Comments
There are many options, depending on your needs. One way we like to do it is to define a GDExtension node class and on startup register it on /root/ as if it was an autoloader singleton. Then you can call methods on this class or use signals both from inside Godot and also from the host application. We will extend the samples with an example that shows how it can be done. |
@kisg That sounds like a good approach. Another way might be to transparently route signals back out to Swift, maybe with an easy way to register and/or filter events for performance. Going the other way, function calls are good, but I imagine marshaling/pickling might become an issue. Conversion to string or JSON is one way out, but being able to send binary buffers means media could also be exchanged. There's also tying into FWIW, the only comparable system I've come across is the Unity embedding model:
A few other embedding notes:
|
Any update on this @kisg? |
From @raminf:
Another thing that isn't clear is how to best communicate between the embedded Godot view and the native app (and vice-versa). For example, to pass a username down into the Godot view, and have the scores from the mini-games bubble back up to the main application. I can file that as a separate issue if easier to track.
The text was updated successfully, but these errors were encountered: