mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-04 14:11:02 +03:00
61 lines
2.5 KiB
ReStructuredText
61 lines
2.5 KiB
ReStructuredText
.. Generated automatically by doc/tools/makerst.py in Godot's source tree.
|
|
.. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead.
|
|
|
|
.. _class_VisibilityEnabler:
|
|
|
|
VisibilityEnabler
|
|
=================
|
|
|
|
**Inherits:** :ref:`VisibilityNotifier<class_visibilitynotifier>` **<** :ref:`Spatial<class_spatial>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
|
|
|
|
**Category:** Core
|
|
|
|
Brief Description
|
|
-----------------
|
|
|
|
Enable certain nodes only when visible.
|
|
|
|
Member Functions
|
|
----------------
|
|
|
|
+--------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`is_enabler_enabled<class_VisibilityEnabler_is_enabler_enabled>` **(** :ref:`int<class_int>` enabler **)** const |
|
|
+--------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_enabler<class_VisibilityEnabler_set_enabler>` **(** :ref:`int<class_int>` enabler, :ref:`bool<class_bool>` enabled **)** |
|
|
+--------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
Member Variables
|
|
----------------
|
|
|
|
- :ref:`bool<class_bool>` **freeze_bodies**
|
|
- :ref:`bool<class_bool>` **pause_animations**
|
|
|
|
Numeric Constants
|
|
-----------------
|
|
|
|
- **ENABLER_FREEZE_BODIES** = **1** --- This enabler will freeze :ref:`RigidBody<class_rigidbody>` nodes.
|
|
- **ENABLER_PAUSE_ANIMATIONS** = **0** --- This enabler will pause :ref:`AnimationPlayer<class_animationplayer>` nodes.
|
|
- **ENABLER_MAX** = **2**
|
|
|
|
Description
|
|
-----------
|
|
|
|
The VisibilityEnabler will disable :ref:`RigidBody<class_rigidbody>` and :ref:`AnimationPlayer<class_animationplayer>` nodes when they are not visible. It will only affect other nodes within the same scene as the VisibilityEnabler itself.
|
|
|
|
Member Function Description
|
|
---------------------------
|
|
|
|
.. _class_VisibilityEnabler_is_enabler_enabled:
|
|
|
|
- :ref:`bool<class_bool>` **is_enabler_enabled** **(** :ref:`int<class_int>` enabler **)** const
|
|
|
|
Returns whether the specified enabler was set to true or not.
|
|
|
|
.. _class_VisibilityEnabler_set_enabler:
|
|
|
|
- void **set_enabler** **(** :ref:`int<class_int>` enabler, :ref:`bool<class_bool>` enabled **)**
|
|
|
|
Set an enabler to true for all nodes of its type to be disabled when the VisibilityEnabler is not in view. See the constants for enablers and what they affect.
|
|
|
|
|