GodotChrome
A downloadable tool
Godot Chrome
Godot Chrome is a plugin that exposes Android WebKit's API v1 to Godot Engine GDScript via Android plugins. Users can create an embedded Chrome web browser in Godot Engine.
This plugin currently works for the Godot 3.5 branch and newer. It uses V1 Plugin Integration with .gdap
files but relies on Godot's Maven repository as a dependency in the project's build.gradle
file rather than local .aar
files.
๐ Documentation
๐ Creating an Embedded Chrome Browser
Use the following GDScript function to create an embedded Chrome browser:
helloWorld(url, headers, enableJavaScript, order, debugger)
Parameters:
url: String
โ The URL to load.headers: Dictionary = Dictionary()
โ Custom HTTP headers.enableJavaScript: Boolean = false
โ Enables JavaScript (default:false
for security reasons).order: Int = -99
โ WebView layering order (-99
is the default overlay for UI and background renders).debugger: Boolean = true
โ Storesconsole.log
messages that can be parsed in Godot.
๐ Other Methods:
goodByeWorld()
โ Destroys the web view instance.getCurrentHeight()
โ Returns the height of the loaded HTML page as an integer.getTitle()
โ Returns the title of the loaded URL as a string.getProgress()
โ Returns the progress of the current page (1 - 100).consoleLog()
โ Prints JavaScriptconsole.log()
entries to Godot as a dictionary. Also debugs the embedded Chrome instance status.
๐ Signals:
<strong>connected</strong>
โ Emitted when an embedded browser instance is created.<strong>disconnected</strong>
โ Emitted when the embedded browser instance is destroyed.
๐ How To Use
- Download the Plugin:
Download and export the
.gdap
and.aar
release files for Godot 3, and place them in your res://android/plugins folder, for Godot 4, export .aar files pluginV2.gd and plugin.cfg to your res://addons/GodotChrome folder and enable the GodotChrome in your plugin settins - Place the Files:
Move them into your project directory for Godot 3:
res://project/android/plugin
- Enable the Plugin:
- In Export Settings (Godot Engine), enable Custom Build.
- Check GodotChrome Plugin.
- Initialize the Engine in Code:
var Chrome = Engine.get_singleton("GodotChrome")
- Call Supported Methods on Your Chrome Instance
Example:
Chrome.helloWorld("https://example.com", {}, true, -99, true)
๐ฅ Godot 4.4 Support
A Godot 4.4+ version will be available for $1.99 to support long-term maintenance and updates. This version will continue implementing Android WebKit API v1 calls.
The main branch remains focused on Godot 3.5+ support.
๐ฎ Happy Coding with Godot Chrome! ๐
Updated | 1 day ago |
Status | Released |
Category | Tool |
Author | Inhumanity studios |
Download
Click download now to get access to the following files:
Development log
- Godot Chrome Documentation & Plugin Update2 days ago
Comments
Log in with itch.io to leave a comment.
Hello, any possible chance of getting more detailed instructions on how to use this with godot 4.3 ?
Yeah, Sorry about that. Godot 4.* Uses android plugin V2. I already wrote down some code for using it with Godot 4, but it's a bit too technical and untested, so I'll be writing a tutorial devlog with examples for it in the next update and including it in the repository. Thanks ๐ฅ ๐๐
I see, ok no worries, thanks for the effort!
Godot 4 version is now currently available for download. Thank you for your patience!