Skip to content

Commit 773bd2a

Browse files
Update README.md
1 parent 653cd83 commit 773bd2a

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

Diff for: README.md

+21
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,24 @@ In order for prefab / scene enum gen to work the following needs to be added in
1717
<AdditionalFiles Include="Scenes\**\*.tscn" />
1818
</ItemGroup>
1919
```
20+
21+
## Switching Scenes
22+
> [!IMPORTANT]
23+
> You will need to restart your IDE if you want to see the new changes to the `Prefab` and `Scene` classes.
24+
25+
Any `.tscn` files placed in the following paths will be added to `Prefab` and `Scene` classes.
26+
27+
- **Prefab Resources**:
28+
- **Search Path**: `res://**/Prefabs/**/*.tscn`
29+
- **Associated Class**: `Prefab`
30+
31+
- **Scene Resources**:
32+
- **Search Path**: `res://Scenes/**/*.tscn`
33+
- **Associated Class**: `Scene`
34+
35+
**Example Usage**
36+
37+
```cs
38+
Game.SwitchScene(Scene.UICredits);
39+
Game.SwitchScene(Prefab.UIOptions);
40+
```

0 commit comments

Comments
 (0)