Services - CSharpGodotTools/Template GitHub Wiki
Important
The service attribute is only valid on scripts that extend from Node.
// Services assume there will only ever be one instance of this script.
// All services get cleaned up on scene change.
[Service]
public partial class Vignette : ColorRect
{
public void LightPulse() { ... }
}
// Call service from anywhere in your code
Vignette vignette = Services.Get<Vignette>();
vignette.LightPulse();