Skip to content

Source Generators

Valk edited this page Oct 4, 2024 · 3 revisions

Important

You will need to restart your IDE if you want to see the new changes to the Prefab and Scene classes.

Switching Scenes

Any .tscn files placed in the following paths will be added to Prefab and Scene classes.

  • Prefab Resources:

    • Search Path: res://**/Prefabs/**/*.tscn
    • Associated Class: Prefab
  • Scene Resources:

    • Search Path: res://Scenes/**/*.tscn
    • Associated Class: Scene

Example Usage

Game.SwitchScene(Scene.UICredits);
Game.SwitchScene(Prefab.UIOptions);
Clone this wiki locally