https://github.com/csharpredottools/sourcegenerators
https://github.com/csharpredottools/sourcegenerators
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/csharpredottools/sourcegenerators
- Owner: CSharpRedotTools
- Created: 2024-10-18T04:50:46.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-18T04:57:33.000Z (over 1 year ago)
- Last Synced: 2025-01-14T23:45:57.242Z (about 1 year ago)
- Language: C#
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SourceGenerators
In order for prefab / scene enum gen to work the following needs to be added in the main Godot .csproj
```xml
```
## Switching Scenes
> [!IMPORTANT]
> You will need to restart your IDE if you want to see the new changes to the `Prefab` and `Scene` classes.
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**
```cs
Game.SwitchScene(Scene.UICredits);
Game.SwitchScene(Prefab.UIOptions);
```