Table of Contents

Class VisibleOnScreenEnabler3D

Namespace
Godot
Assembly
GodotSharp.dll

VisibleOnScreenEnabler3D contains a box-shaped region of 3D space and a target node. The target node will be automatically enabled (via its ProcessMode property) when any part of this region becomes visible on the screen, and automatically disabled otherwise. This can for example be used to activate enemies only when the player approaches them.

See VisibleOnScreenNotifier3D if you only want to be notified when the region is visible on screen.

Note: VisibleOnScreenEnabler3D uses an approximate heuristic that doesn't take walls and other occlusion into account, unless occlusion culling is used. It also won't function unless Visible is set to true.

public class VisibleOnScreenEnabler3D : VisibleOnScreenNotifier3D, IDisposable
Inheritance
VisibleOnScreenEnabler3D
Implements
Inherited Members

Constructors

VisibleOnScreenEnabler3D()

public VisibleOnScreenEnabler3D()

Properties

EnableMode

Determines how the target node is enabled. Corresponds to Node.ProcessModeEnum. When the node is disabled, it always uses Disabled.

public VisibleOnScreenEnabler3D.EnableModeEnum EnableMode { get; set; }

Property Value

VisibleOnScreenEnabler3D.EnableModeEnum

EnableNodePath

The path to the target node, relative to the VisibleOnScreenEnabler3D. The target node is cached; it's only assigned when setting this property (if the VisibleOnScreenEnabler3D is inside the scene tree) and every time the VisibleOnScreenEnabler3D enters the scene tree. If the path is empty, no node will be affected. If the path is invalid, an error is also generated.

public NodePath EnableNodePath { get; set; }

Property Value

NodePath

Methods

HasGodotClassMethod(in godot_string_name)

Check if the type contains a method with the given name. This method is used by Godot to check if a method exists before invoking it. Do not call or override this method.

protected override bool HasGodotClassMethod(in godot_string_name method)

Parameters

method godot_string_name

Name of the method to check for.

Returns

bool

HasGodotClassSignal(in godot_string_name)

Check if the type contains a signal with the given name. This method is used by Godot to check if a signal exists before raising it. Do not call or override this method.

protected override bool HasGodotClassSignal(in godot_string_name signal)

Parameters

signal godot_string_name

Name of the signal to check for.

Returns

bool

InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)

Invokes the method with the given name, using the given arguments. This method is used by Godot to invoke methods from the engine side. Do not call or override this method.

protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)

Parameters

method godot_string_name

Name of the method to invoke.

args NativeVariantPtrArgs

Arguments to use with the invoked method.

ret godot_variant

Value returned by the invoked method.

Returns

bool