https://github.com/toasterofbread/godot-compose-example
PoC Godot project which uses an Android plugin to display native Jetpack Compose content
https://github.com/toasterofbread/godot-compose-example
Last synced: 6 months ago
JSON representation
PoC Godot project which uses an Android plugin to display native Jetpack Compose content
- Host: GitHub
- URL: https://github.com/toasterofbread/godot-compose-example
- Owner: toasterofbread
- License: mit
- Created: 2024-04-25T17:58:06.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-26T18:40:40.000Z (about 2 years ago)
- Last Synced: 2024-05-01T14:09:20.424Z (almost 2 years ago)
- Language: Kotlin
- Homepage:
- Size: 63.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Jetpack Compose in Godot (example project)
PoC Godot project which uses an [Android plugin](https://docs.godotengine.org/en/stable/tutorials/platform/android/android_plugin.html) to display native Jetpack Compose content. Also forwards touch events applied onto the Godot node to the Android view.
The Android view is displayed in Godot by drawing it onto a bitmap, then converting that to an array of pixel bytes and passing that back to Godot and displaying it as an ImageTexture using a TextureRect node. This method is sort of hacky and doesn't seem to work with hardware acceleration, but achieves somewhat usable results.
## Building
1. Build plugin: `./gradlew plugin:build`
2. Install Android build template (project tab)
3. Build Android project