Defines a 2D polygon for LightOccluder2D.
    public class OccluderPolygon2D : Resource

Editor facility that helps you draw a 2D polygon used as resource for LightOccluder2D.

Inheritance Chain

Constructors

    public OccluderPolygon2D()

Properties

    public bool Closed { get; set; }

If true, closes the polygon. A closed OccluderPolygon2D occludes the light coming from any direction. An opened OccluderPolygon2D occludes the light only at its outline’s direction.

    public CullModeEnum CullMode { get; set; }

The culling mode to use.

    public Vector2[] Polygon { get; set; }

A Vector2 array with the index for polygon’s vertices positions.

Note: The returned value is a copy of the underlying array, rather than a reference.

Methods

    [Obsolete("GetCullMode is deprecated. Use the CullMode property instead.")]
    public CullModeEnum GetCullMode()

Getter for CullMode

    [Obsolete("GetPolygon is deprecated. Use the Polygon property instead.")]
    public Vector2[] GetPolygon()

Getter for Polygon

    [Obsolete("IsClosed is deprecated. Use the Closed property instead.")]
    public bool IsClosed()

Getter for Closed

    [Obsolete("SetClosed is deprecated. Use the Closed property instead.")]
    public void SetClosed(bool closed)

Setter for Closed

    [Obsolete("SetCullMode is deprecated. Use the CullMode property instead.")]
    public void SetCullMode(CullModeEnum cullMode)

Setter for CullMode

    [Obsolete("SetPolygon is deprecated. Use the Polygon property instead.")]
    public void SetPolygon(Vector2[] polygon)

Setter for Polygon

Inner Types

CullModeEnum

Name Value Description
Disabled 0 Culling is disabled. See [member cull_mode].
Clockwise 1 Culling is performed in the clockwise direction. See [member cull_mode].
CounterClockwise 2 Culling is performed in the counterclockwise direction. See [member cull_mode].
Tags: