Class ShapeEditor | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class ShapeEditor

    Inheritance
    System.Object
    ShapeEditor
    Namespace: UnityEditor.U2D
    Syntax
    public class ShapeEditor

    Constructors

    ShapeEditor()

    Declaration
    public ShapeEditor()

    Fields

    Frame

    Declaration
    public Action<Bounds> Frame
    Field Value
    Type Description
    System.Action<Bounds>

    GetForwardVector

    Declaration
    public Func<Vector3> GetForwardVector
    Field Value
    Type Description
    System.Func<Vector3>

    GetHandleSize

    Declaration
    public Func<Vector3, float> GetHandleSize
    Field Value
    Type Description
    System.Func<Vector3, System.Single>

    GetLeftTangent

    Declaration
    public Func<int, Vector3> GetLeftTangent
    Field Value
    Type Description
    System.Func<System.Int32, Vector3>

    GetPointCapActive

    Declaration
    public Handles.CapFunction GetPointCapActive
    Field Value
    Type Description
    Handles.CapFunction

    GetPointCapHovered

    Declaration
    public Handles.CapFunction GetPointCapHovered
    Field Value
    Type Description
    Handles.CapFunction

    GetPointCapNormal

    Declaration
    public Handles.CapFunction GetPointCapNormal
    Field Value
    Type Description
    Handles.CapFunction

    GetPointCapPreview

    Declaration
    public Handles.CapFunction GetPointCapPreview
    Field Value
    Type Description
    Handles.CapFunction

    GetPointCapSelected

    Declaration
    public Handles.CapFunction GetPointCapSelected
    Field Value
    Type Description
    Handles.CapFunction

    GetPointCount

    Declaration
    public Func<int> GetPointCount
    Field Value
    Type Description
    System.Func<System.Int32>

    GetPosition

    Declaration
    public Func<int, Vector3> GetPosition
    Field Value
    Type Description
    System.Func<System.Int32, Vector3>

    GetRightTangent

    Declaration
    public Func<int, Vector3> GetRightTangent
    Field Value
    Type Description
    System.Func<System.Int32, Vector3>

    GetRightVector

    Declaration
    public Func<Vector3> GetRightVector
    Field Value
    Type Description
    System.Func<Vector3>

    GetTangentCapActive

    Declaration
    public Handles.CapFunction GetTangentCapActive
    Field Value
    Type Description
    Handles.CapFunction

    GetTangentCapHovered

    Declaration
    public Handles.CapFunction GetTangentCapHovered
    Field Value
    Type Description
    Handles.CapFunction

    GetTangentCapNormal

    Declaration
    public Handles.CapFunction GetTangentCapNormal
    Field Value
    Type Description
    Handles.CapFunction

    GetTangentMode

    Declaration
    public Func<int, ShapeEditor.TangentMode> GetTangentMode
    Field Value
    Type Description
    System.Func<System.Int32, ShapeEditor.TangentMode>

    GetUpVector

    Declaration
    public Func<Vector3> GetUpVector
    Field Value
    Type Description
    System.Func<Vector3>

    InsertPointAt

    Declaration
    public Action<int, Vector3> InsertPointAt
    Field Value
    Type Description
    System.Action<System.Int32, Vector3>

    LocalToWorldMatrix

    Declaration
    public Func<Matrix4x4> LocalToWorldMatrix
    Field Value
    Type Description
    System.Func<Matrix4x4>

    OpenEnded

    Declaration
    public Func<bool> OpenEnded
    Field Value
    Type Description
    System.Func<System.Boolean>

    RecordUndo

    Declaration
    public Action RecordUndo
    Field Value
    Type Description
    System.Action

    RemovePointAt

    Declaration
    public Action<int> RemovePointAt
    Field Value
    Type Description
    System.Action<System.Int32>

    Repaint

    Declaration
    public Action Repaint
    Field Value
    Type Description
    System.Action

    ScreenToWorld

    Declaration
    public Func<Vector2, Vector3> ScreenToWorld
    Field Value
    Type Description
    System.Func<Vector2, Vector3>

    SetLeftTangent

    Declaration
    public Action<int, Vector3> SetLeftTangent
    Field Value
    Type Description
    System.Action<System.Int32, Vector3>

    SetPosition

    Declaration
    public Action<int, Vector3> SetPosition
    Field Value
    Type Description
    System.Action<System.Int32, Vector3>

    SetRightTangent

    Declaration
    public Action<int, Vector3> SetRightTangent
    Field Value
    Type Description
    System.Action<System.Int32, Vector3>

    SetTangentMode

    Declaration
    public Action<int, ShapeEditor.TangentMode> SetTangentMode
    Field Value
    Type Description
    System.Action<System.Int32, ShapeEditor.TangentMode>

    Snap

    Declaration
    public Func<Vector3, Vector3> Snap
    Field Value
    Type Description
    System.Func<Vector3, Vector3>

    WorldToScreen

    Declaration
    public Func<Vector3, Vector2> WorldToScreen
    Field Value
    Type Description
    System.Func<Vector3, Vector2>

    Properties

    lineTexture

    Declaration
    public Texture2D lineTexture { get; set; }
    Property Value
    Type Description
    Texture2D

    Methods

    DrawGUIStyleCap(Int32, Vector3, Quaternion, Single, GUIStyle)

    Declaration
    public void DrawGUIStyleCap(int controlID, Vector3 position, Quaternion rotation, float size, GUIStyle guiStyle)
    Parameters
    Type Name Description
    System.Int32 controlID
    Vector3 position
    Quaternion rotation
    System.Single size
    GUIStyle guiStyle

    HandleSinglePointSelection()

    Declaration
    public void HandleSinglePointSelection()

    OnGUI()

    Declaration
    public void OnGUI()

    PointCapHovered(Int32, Vector3, Quaternion, Single, EventType)

    Declaration
    public void PointCapHovered(int controlID, Vector3 position, Quaternion rotation, float size, EventType eventType)
    Parameters
    Type Name Description
    System.Int32 controlID
    Vector3 position
    Quaternion rotation
    System.Single size
    EventType eventType

    PointCapNormal(Int32, Vector3, Quaternion, Single, EventType)

    Declaration
    public void PointCapNormal(int controlID, Vector3 position, Quaternion rotation, float size, EventType eventType)
    Parameters
    Type Name Description
    System.Int32 controlID
    Vector3 position
    Quaternion rotation
    System.Single size
    EventType eventType

    PointCapPreview(Int32, Vector3, Quaternion, Single, EventType)

    Declaration
    public void PointCapPreview(int controlID, Vector3 position, Quaternion rotation, float size, EventType eventType)
    Parameters
    Type Name Description
    System.Int32 controlID
    Vector3 position
    Quaternion rotation
    System.Single size
    EventType eventType

    PointCapSelected(Int32, Vector3, Quaternion, Single, EventType)

    Declaration
    public void PointCapSelected(int controlID, Vector3 position, Quaternion rotation, float size, EventType eventType)
    Parameters
    Type Name Description
    System.Int32 controlID
    Vector3 position
    Quaternion rotation
    System.Single size
    EventType eventType

    SetDirty()

    Declaration
    public void SetDirty()

    TangentCapActive(Int32, Vector3, Quaternion, Single, EventType)

    Declaration
    public void TangentCapActive(int controlID, Vector3 position, Quaternion rotation, float size, EventType eventType)
    Parameters
    Type Name Description
    System.Int32 controlID
    Vector3 position
    Quaternion rotation
    System.Single size
    EventType eventType

    TangentCapHovered(Int32, Vector3, Quaternion, Single, EventType)

    Declaration
    public void TangentCapHovered(int controlID, Vector3 position, Quaternion rotation, float size, EventType eventType)
    Parameters
    Type Name Description
    System.Int32 controlID
    Vector3 position
    Quaternion rotation
    System.Single size
    EventType eventType

    TangentCapNormal(Int32, Vector3, Quaternion, Single, EventType)

    Declaration
    public void TangentCapNormal(int controlID, Vector3 position, Quaternion rotation, float size, EventType eventType)
    Parameters
    Type Name Description
    System.Int32 controlID
    Vector3 position
    Quaternion rotation
    System.Single size
    EventType eventType
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023