webglgodot4sharedarraybuffer

How to Play a Godot 4 HTML Project Locally?


I have exported the web version of my Godot 4, it is in a folder on my local drive.

Because of the SharedArrayBuffer dependency I can not just double-click in the index.html file. If I do so I see this error:

Error The following features required to run Godot projects on the Web are missing: Cross Origin Isolation - Check web server configuration (send correct headers) SharedArrayBuffer - Check web server configuration (send correct headers)

How can I run it in local?


Solution

  • For testing purposes, Godot can export and host your game locally through one-click deploy. After setting up your export template, go to the top-right corner, click the fourth button from the left ("Remote Deploy"), and select "Run in Browser".

    Remote Deploy dropdown, displaying options for Android and Web.