Getting started (hello-world)

2025-01-01

Add a WebView node to your scene. In the node inspector, you can configure things like the URL to browse, refresh-rate, zoom, etc.

To display the webview in your Godot project, you have 3 options:

  1. Render fullscreen
  2. Render on a 3D plane
  3. Handle it manually and render the texture on whatever you want

Below are the 2 easiest methods:

Render fullscreen

To render the webview fullscreen:

  1. Add a TextureRect as a child-node
  2. Configure an URL to browse to

Render onto a 3D plane

To render the webview onto a 3D plane:

  1. Add a MeshInstance3D as a child-node
  2. Give this MeshInstance3D a PlaneMesh in the inspector
  3. Configure an URL to browse to

Then, attach a script to your scene, with the following code:

func _ready():
    $WebView.connect("view_ready", _on_view_ready)

func _on_view_ready():
    $WebView.load()

view_ready is a signal that is emitted when the webview is ready, at which point we can call load().

That's it!

Please note this is the "basic" way of using the webview where it automatically sets up mouse and keyboard event handlers. For more advanced usage: