.. Generated automatically by doc/tools/makerst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the VisibilityNotifier2D.xml source instead. .. The source is found in doc/classes or modules//doc_classes. .. _class_VisibilityNotifier2D: VisibilityNotifier2D ==================== **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` **Inherited By:** :ref:`VisibilityEnabler2D` **Category:** Core Brief Description ----------------- Detects when the node is visible on screen. Member Functions ---------------- +----------------------------+---------------------------------------------------------------------------------------------------+ | :ref:`Rect2` | :ref:`get_rect` **(** **)** const | +----------------------------+---------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_on_screen` **(** **)** const | +----------------------------+---------------------------------------------------------------------------------------------------+ | void | :ref:`set_rect` **(** :ref:`Rect2` rect **)** | +----------------------------+---------------------------------------------------------------------------------------------------+ Signals ------- - **screen_entered** **(** **)** Emitted when the VisibilityNotifier2D enters the screen. - **screen_exited** **(** **)** Emitted when the VisibilityNotifier2D exits the screen. - **viewport_entered** **(** :ref:`Object` viewport **)** Emitted when the VisibilityNotifier2D enters a :ref:`Viewport`'s view. - **viewport_exited** **(** :ref:`Object` viewport **)** Emitted when the VisibilityNotifier2D exits a :ref:`Viewport`'s view. Member Variables ---------------- - :ref:`Rect2` **rect** - The VisibilityNotifier2D's bounding rectangle. Description ----------- The VisibilityNotifier2D detects when it is visible on the screen. It also notifies when its bounding rectangle enters or exits the screen or a viewport. Member Function Description --------------------------- .. _class_VisibilityNotifier2D_get_rect: - :ref:`Rect2` **get_rect** **(** **)** const Returns the bounding rectangle of the VisibilityNotifier2D. .. _class_VisibilityNotifier2D_is_on_screen: - :ref:`bool` **is_on_screen** **(** **)** const If ``true`` the bounding rectangle is on the screen. .. _class_VisibilityNotifier2D_set_rect: - void **set_rect** **(** :ref:`Rect2` rect **)** Set the visibility bounding rectangle of the VisibilityNotifier2D.