-
Notifications
You must be signed in to change notification settings - Fork 9
Services
Valk edited this page May 15, 2025
·
22 revisions
Important
The service attribute is only valid on scripts that extend from Node and the node must be in the scene tree.
// 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();