docs.unity3d.com
Search Results for

    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, bool)
    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, bool)
    Object.Destroy(Object, float)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, bool)
    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.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: UnityEditor.ProBuilder
    Assembly: Unity.ProBuilder.Editor.dll
    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(bool)

    Redraws the PolyShape mesh in the Unity Editor.

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

    This parameter is ignored.

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)