Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using Godot;
- public class SingletonThing: Node
- {
- private static SingletonThing instance;
- public static SingletonThing Instance => instance;
- public override void _Ready()
- {
- instance = this;
- }
- public string SomeField = "My field";
- public void SomeMethod()
- {
- GD.print("Hello from the singleton!");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement