-
Couldn't load subscription status.
- Fork 10
Services
Valk edited this page May 15, 2025
·
25 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();