VisibilityEnabler2D

    Category: Core

    Enable certain nodes only when visible.

    • ENABLER_FREEZE_BODIES = 1 — This enabler will freeze nodes.
    • ENABLER_PAUSE_PARTICLES = 2 — This enabler will stop Particles2D nodes.
    • ENABLER_PARENT_PROCESS = 3 — This enabler will stop the parent’s _process function.
    • ENABLER_PARENT_PHYSICS_PROCESS = 4 — This enabler will stop the parent’s _physics_process function.
    • ENABLER_PAUSE_ANIMATED_SPRITES = 5

    The VisibilityEnabler2D will disable , AnimationPlayer, and other nodes when they are not visible. It will only affect other nodes within the same scene as the VisibilityEnabler2D itself.

    • freeze_bodies
    Setterset_enabler(value)
    Getteris_enabler_enabled()

    If , RigidBody2D nodes will be paused.


    • pause_animated_sprites

    • bool pause_animations
    Setterset_enabler(value)
    Getteris_enabler_enabled()

    If , nodes will be paused.


    • bool pause_particles

    If true, nodes will be paused.


    • bool physics_process_parent
    Setterset_enabler(value)
    Getteris_enabler_enabled()

    If true, the parent’s will be stopped.