docs.unity.cn
    Show / Hide Table of Contents

    Class PolyShapeTool

    Represents the PolyShape tool button on the ProBuilder toolbar in the Editor.

    Inheritance
    Object
    Object
    ScriptableObject
    EditorTool
    PolyShapeTool
    Inherited Members
    EditorTool.IsAvailable()
    EditorTool.targets
    EditorTool.target
    ScriptableObject.CreateInstance(String)
    ScriptableObject.CreateInstance(Type)
    ScriptableObject.CreateInstance<T>()
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(Object)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, Boolean)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, Boolean)
    Object.Destroy(Object, Single)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, Boolean)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.DontDestroyOnLoad(Object)
    Object.FindObjectsOfType<T>()
    Object.FindObjectOfType<T>()
    Object.FindObjectOfType(Type)
    Object.ToString()
    Object.name
    Object.hideFlags
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: UnityEditor.ProBuilder
    Syntax
    [EditorTool("Edit PolyShape", typeof(PolyShape))]
    public class PolyShapeTool : EditorTool

    Properties

    polygon

    Gets or sets the custom polygon shape.

    Declaration
    public PolyShape polygon { get; set; }
    Property Value
    Type Description
    PolyShape

    toolbarIcon

    Gets the icon and tooltip for the PolyShapeTool.

    Declaration
    public override GUIContent toolbarIcon { get; }
    Property Value
    Type Description
    GUIContent
    Overrides
    EditorTool.toolbarIcon

    Methods

    OnToolGUI(EditorWindow)

    Implements the PolyShapeTool in the Unity Editor. This method is called when the PolyShapeTool is activated.

    Declaration
    public override void OnToolGUI(EditorWindow window)
    Parameters
    Type Name Description
    EditorWindow window

    The window calling the tool (SceneView).

    Overrides
    EditorTool.OnToolGUI(EditorWindow)

    RebuildPolyShapeMesh(Boolean)

    Redraws the PolyShape mesh in the Unity Editor.

    Declaration
    public void RebuildPolyShapeMesh(bool vertexCountChanged = false)
    Parameters
    Type Name Description
    Boolean vertexCountChanged

    This parameter is ignored.

    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Tuesday, June 13, 2023