ScreenNotifier
A rectangle that reports whether the camera can reach it: an enemy that wakes only once seen, a trap that resets once the camera leaves it. A script on a Screen base needs one here to hear it arrive and leave.
On this page
Add it
Add component → ScreenNotifierComponent in the Inspector, on the node that should carry it.
From a script
A script on the same node writes these fields by name. ScreenNotifierComponent is the name to pass.
rgs
set_point("ScreenNotifierComponent", "size", vec2(64.0, 64.0));
set_flag("ScreenNotifierComponent", "enabler", false); Fields
| Field | Script name | Kind | Default | What it does |
|---|---|---|---|---|
| Size | size | two numbers (x, y), at least 1 | (64, 64) | The rectangle the view has to reach, centred on the node. |
| Enabler | enabler | checkbox | off | Also stop this node and its children while off screen. |
| On Screen | on_screen | checkbox, read-only | off | Whether the view reached the rectangle. |