Hi, new to Godot so trying to figure out how to do this. We want to build a native desktop app (using something like Electron or SwiftUI etc) which will have certain features. We also want to embed inside this app a godot game. (The idea being users can switch between two tabs … the game and the app’s other features. Its for the academic market so we are trying to use a game to teach but its not easy to build the rest of the education app UI in godot … so we wanna use ReactJS or SwiftUI to build that).
Not sure if I explained this clearly. Anyways was wondering how to go about this. How do we export from Godot so we can include it inside another Windows or Mac Desktop app.
I have no idea about SwiftUI or other native frameworks, but I have some Electron experience:
If you use an Electron based app, which essentially is just a web browser, then you can use the Web Export of Godot. The Web Export is basically a HTML page that includes our game compiled to Javascript. For more details and also on how to tweak the Web Export to your needs to embed it into Electron, please refer to: Exporting for the Web — Godot Engine (stable) documentation in English
However, I would like to challenge your statement of “but its not easy to build the rest of the education app UI in godot” because Godot has a super flexible and extensible UI system that - with some theming applied - can also look like a native desktop app. I just put together something with Godot over the last two weeks:
My goal is to recreate that drum machine in Godot using the audio system and this extended UI framework. I agree, Godot is capable, maybe just need some more UI components and data abstractions for the UI.
Edit: I meant port the UI components/framework to Godot. I like the idea of not running UI in the browser and trying to get more performance.
Godot is absolutely and emphatically not a substitute for React or SwiftUI. Godot’s UI tools are more approachable for beginners, due to the simplicity and constraints, but they are very tedious to work with as an advanced user. Godot also lacks the accessibility features you can get with other tools, like screen reader compatibility. The previous commenter is also mistaken to claim that Godot can be made to look like a native desktop app. This cannot be accomplished with Godot’s built-in tools, nor any addon that I’m aware of, not beyond simply using system theme colors on Win, OSX, and Android.
You would probably have an easier time using PixiJS, Three.js, or Babylon.js for the game portion instead of trying to embed one thing in the other.
Pardon me. To be clear, I was referring to the first reply in this thread, which wrote that “Godot has a super flexible and extensible UI system that - with some theming applied - can also look like a native desktop app”. I don’t agree with this.