docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class SplineMeshHandle<T>

    Creates a cylinder mesh along a spline.

    Inheritance
    object
    SplineMeshHandle<T>
    Implements
    IDisposable
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEditor.Splines
    Assembly: Unity.Splines.Editor.dll
    Syntax
    public class SplineMeshHandle<T> : IDisposable where T : ISpline
    Type Parameters
    Name Description
    T

    The type of ISpline.

    Constructors

    SplineMeshHandle()

    Creates a new mesh handle. This class implements IDisposable to clean up allocated mesh resources. Call Dispose() when you are finished with the instance.

    Declaration
    public SplineMeshHandle()

    SplineMeshHandle(Material)

    Create a new mesh handle. This class implements IDisposable to clean up allocated mesh resources. Call Dispose() when you are finished with the instance.

    Declaration
    public SplineMeshHandle(Material material)
    Parameters
    Type Name Description
    Material material

    The material to render the cylinder mesh with.

    Properties

    material

    The material to render this mesh with. If null, a default material is used.

    Declaration
    public Material material { get; set; }
    Property Value
    Type Description
    Material

    Methods

    Dispose()

    Destroys the 3D mesh.

    Declaration
    public void Dispose()

    Do(int, T, float, int)

    Draws a 3D mesh handle from a spline.

    Declaration
    public void Do(int controlID, T spline, float size, int resolution = 10)
    Parameters
    Type Name Description
    int controlID

    The spline mesh controlID.

    T spline

    The target spline.

    float size

    The width to use for the spline mesh.

    int resolution

    The resolution to use for the mesh, defines the number of segments per unit with default value of DrawResolutionDefault.

    Do(int, T, float, Color, int)

    Draws a 3D mesh handle from a spline.

    Declaration
    public void Do(int controlID, T spline, float size, Color color, int resolution = 10)
    Parameters
    Type Name Description
    int controlID

    The spline mesh controlID.

    T spline

    The target spline.

    float size

    The width to use for the spline mesh.

    Color color

    The color to use for the spline mesh in normal mode.

    int resolution

    The resolution to use for the mesh, defines the number of segments per unit with default value of DrawResolutionDefault.

    Do(T, float, int)

    Draws a 3D mesh from a spline.

    Declaration
    public void Do(T spline, float size, int resolution = 10)
    Parameters
    Type Name Description
    T spline

    The target spline.

    float size

    The width to use for the spline mesh.

    int resolution

    The resolution to use for the mesh, defines the number of segments per unit with default value of DrawResolutionDefault.

    Do(T, float, Color, int)

    Draws a 3D mesh from a spline.

    Declaration
    public void Do(T spline, float size, Color color, int resolution = 10)
    Parameters
    Type Name Description
    T spline

    The target spline.

    float size

    The width to use for the spline mesh.

    Color color

    The color to use for the spline mesh in normal mode.

    int resolution

    The resolution to use for the mesh, defines the number of segments per unit with default value of DrawResolutionDefault.

    Implements

    IDisposable
    In This Article
    Back to top
    Copyright © 2024 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)