Enable certain nodes only when visible.
    public class VisibilityEnabler2D : VisibilityNotifier2D

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

Inheritance Chain


    public VisibilityEnabler2D()


    public bool FreezeBodies { get; set; }

    public bool PauseAnimatedSprites { get; set; }

    public bool PauseAnimations { get; set; }

    public bool PauseParticles { get; set; }

    public bool PhysicsProcessParent { get; set; }

    public bool ProcessParent { get; set; }


    public bool IsEnablerEnabled(Enabler enabler)

    public void SetEnabler(Enabler enabler, bool enabled)

Inner Types


Name Value Description
PauseAnimations 0 This enabler will pause [AnimationPlayer] nodes.
FreezeBodies 1 This enabler will freeze [RigidBody2D] nodes.
PauseParticles 2 This enabler will stop [Particles2D] nodes.
ParentProcess 3 This enabler will stop the parent’s _process function.
ParentPhysicsProcess 4 This enabler will stop the parent’s _physics_process function.
PauseAnimatedSprites 5  
Max 6