Skip to content

Components

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

FieldScript nameKindDefaultWhat it does
Sizesizetwo numbers (x, y), at least 1(64, 64)The rectangle the view has to reach, centred on the node.
EnablerenablercheckboxoffAlso stop this node and its children while off screen.
On Screenon_screencheckbox, read-onlyoffWhether the view reached the rectangle.