Getting Started

Quick Start

Learn how to set up and use Godot-Router for file-based routing in your Godot project.


Setup

  1. Install Godot-Router Addon
  2. Download or install the Godot-Router addon in your Godot project.
  3. Enable the Addon
  4. In Godot, go to Project > Project Settings > Plugins and enable Godot-Router.
  5. Create routes Folder
  6. In your project, create a routes folder if it doesn't exist.
  7. Add a Page
  8. Add a new folder inside routes (e.g., routes/main), then add a +page.tscn scene inside it. This becomes a route.
  9. Set Main Scene
  10. In Godot, go to Project > Project Settings > Run > Main Scene and set it to your new +page.tscn (e.g., routes/main/+page.tscn).
  11. Run your project. In a script, use Router.goto to navigate to another route.

    Router.goto("/main")
    .gdscript