Opening a Web Browser is Really Easy in Godot

Hello friends! This post is going to be short and sweet because well.. it only takes one line of code to open a web page up in Godot. The demo project can be found here with an example on how to create a button that when clicked will take you to my twitter.

The magic line of code is..


When OS.ShellOpen is passed a URL it will open up the default web browser of the operating system your game is running on.

I’ve checked out a few small projects and never see this being used. It’s such a powerful tool for growing a community for your game, I had to share it.

That’s it! So now there is no excuse why I shouldn’t see a button to your Twitter, Discord, Facebook, Twitch, dog’s Instagram from your home menu!

Demo (but really the code above is the only magical bit)