VisibilityEnabler2D

Enables certain nodes only when approximately visible.

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. If you just want to receive notifications, use VisibilityNotifier2D instead. Note: For performance reasons, VisibilityEnabler2D uses an approximate heuristic with precision determined by ProjectSettings.world/2d/cellSize. If you need precise visibility checking, use another method such as adding an Area2D node as a child of a Camera2D node. Note: VisibilityEnabler2D will not affect nodes added after scene initialization.

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Enums

Constants
enum Constants
Enabler
enum Enabler

Functions

_nodeRemoved
void _nodeRemoved(Node arg0)
isEnablerEnabled
bool isEnablerEnabled(long enabler)

Returns whether the enabler identified by given enabler constant is active.

opAssign
typeof(null) opAssign(typeof(null) n)
opEquals
bool opEquals(VisibilityEnabler2D other)
opEquals
bool opEquals(typeof(null) n)
setEnabler
void setEnabler(long enabler, bool enabled)

Sets active state of the enabler identified by given enabler constant.

toHash
size_t toHash()

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

freezeBodies
bool freezeBodies [@property getter]
bool freezeBodies [@property setter]

If true, RigidBody2D nodes will be paused.

pauseAnimatedSprites
bool pauseAnimatedSprites [@property getter]
bool pauseAnimatedSprites [@property setter]

If true, AnimatedSprite nodes will be paused.

pauseAnimations
bool pauseAnimations [@property getter]
bool pauseAnimations [@property setter]

If true, AnimationPlayer nodes will be paused.

pauseParticles
bool pauseParticles [@property getter]
bool pauseParticles [@property setter]

If true, Particles2D nodes will be paused.

physicsProcessParent
bool physicsProcessParent [@property getter]
bool physicsProcessParent [@property setter]

If true, the parent's Node._physicsProcess will be stopped.

processParent
bool processParent [@property getter]
bool processParent [@property setter]

If true, the parent's Node._process will be stopped.

Static functions

_new
VisibilityEnabler2D _new()

Construct a new instance of VisibilityEnabler2D. Note: use memnew!VisibilityEnabler2D instead.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

GDNativeClassBinding
struct GDNativeClassBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(ToRef) as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta