Struct VisibilityEnabler2D

Enables certain nodes only when visible.

struct VisibilityEnabler2D ;

The VisibilityEnabler2D will disable RigidBody2D, AnimationPlayer, and other nodes when they are not visible. It will only affect nodes with the same root node as the VisibilityEnabler2D, and the root node itself.

Properties

NameTypeDescription
freezeBodies[get, set] boolIf true, RigidBody2D nodes will be paused.
pauseAnimatedSprites[get, set] boolIf true, AnimatedSprite nodes will be paused.
pauseAnimations[get, set] boolIf true, AnimationPlayer nodes will be paused.
pauseParticles[get, set] boolIf true, Particles2D nodes will be paused.
physicsProcessParent[get, set] boolIf true, the parent's Node.physicsProcess will be stopped.
processParent[get, set] boolIf true, the parent's Node.process will be stopped.

Methods

NameDescription
_nodeRemoved
isEnablerEnabled Returns whether the enabler identified by given enabler constant is active.
setEnabler Sets active state of the enabler identified by given enabler constant.

Enums

NameDescription
Constants
Enabler