GDScript — Reacting to changed variables using setget (Tutorial)

Опубликовано: 19 Июль 2026
на канале: iaknihs
6,877
161

Godot's setget functions provide a way to intercept changes and requests of a variables value, allowing to change the data, or make additional changes which should happen in reaction, such as updating a UI field when a value changed.

The same concept is commonly used for data encapsulation in other languages.