Quick Start
Learn how to set up and use Godot-Router for file-based routing in your Godot project.
Setup
-
Install Godot-Router Addon
-
Enable the Addon
-
Create routes Folder
-
Add a Page
-
Set Main Scene
-
Navigate to Your Page
Download or install the Godot-Router addon in your Godot project.
In Godot, go to Project > Project Settings > Plugins and enable Godot-Router.
In your project, create a
routes folder if it doesn't exist.Add a new folder inside
routes (e.g., routes/main), then add a +page.tscn scene inside it. This becomes a route.In Godot, go to Project > Project Settings > Run > Main Scene and set it to your new
+page.tscn (e.g., routes/main/+page.tscn).Run your project. In a script, use Router.goto to navigate to another route.
Router.goto("/main") .gdscript