Table of Contents

Class LightOccluder2D

Namespace
Godot
Assembly
GodotSharp.dll

Occludes light cast by a Light2D, casting shadows. The LightOccluder2D must be provided with an OccluderPolygon2D in order for the shadow to be computed.

public class LightOccluder2D : Node2D, IDisposable
Inheritance
LightOccluder2D
Implements
Inherited Members

Constructors

LightOccluder2D()

public LightOccluder2D()

Properties

Occluder

The OccluderPolygon2D used to compute the shadow.

public OccluderPolygon2D Occluder { get; set; }

Property Value

OccluderPolygon2D

OccluderLightMask

The LightOccluder2D's occluder light mask. The LightOccluder2D will cast shadows only from Light2D(s) that have the same light mask(s).

public int OccluderLightMask { get; set; }

Property Value

int

SdfCollision

If enabled, the occluder will be part of a real-time generated signed distance field that can be used in custom shaders.

public bool SdfCollision { get; set; }

Property Value

bool

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