LightOccluder2D
Occludes light cast by a Light2D, casting shadows.
Occludes light cast by a Light2D, casting shadows.
Occludes light cast by a Light2D, casting shadows. The LightOccluder2D must be provided with an OccluderPolygon2D in order for the shadow to be computed.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
LightOccluder2DConstructor
public LightOccluder2D();Properties3
OccluderProperty
public OccluderPolygon2D Occluder { get; set; }The OccluderPolygon2D used to compute the shadow.
OccluderLightMaskProperty
public int OccluderLightMask { get; set; }Mask selecting this occluder for shadows. It intersects the light ShadowItemCullMask. Do not substitute the inherited CanvasItem.LightMask: OccluderLightMask is the mask passed to the renderer for this occluder. Configure visible geometry and physics collision separately.
SdfCollisionProperty
public bool SdfCollision { get; set; }If enabled, the occluder will be part of a real-time generated signed distance field that can be used in custom shaders.
Methods6
GetOccluderLightMaskint
public int GetOccluderLightMask();intGetOccluderPolygonOccluderPolygon2D
public OccluderPolygon2D GetOccluderPolygon();OccluderPolygon2DIsSetAsSdfCollisionbool
public bool IsSetAsSdfCollision();boolSetAsSdfCollisionvoid
public void SetAsSdfCollision(bool enable);| Name | Type | Default |
|---|---|---|
enable | bool | — |
SetOccluderLightMaskvoid
public void SetOccluderLightMask(int mask);| Name | Type | Default |
|---|---|---|
mask | int | — |
SetOccluderPolygonvoid
public void SetOccluderPolygon(OccluderPolygon2D polygon);| Name | Type | Default |
|---|---|---|
polygon | OccluderPolygon2D | — |