• Studio

  • Studio API

  • Bots

  • Web API

  • Designer Resources

  • Host Resources

  • Globals

    TrailRenderer

    Inherits from:

    TrailRenderer is a Unity component that creates visually appealing trails behind moving objects, like the tail of a comet streaking through the sky. These trails can enhance the realism of fast-paced games or add visual flair to various effects. Dive into the Unity's TrailRenderer Documentation to explore its capabilities in more detail.

    Properties

    autodestruct

    boolean
    ClientOnly

    Enables or disables automatic destruction of the trail renderer when it finishes emitting particles. Unity's TrailRenderer.autodestruct Documentation

    emitting

    boolean
    ClientOnly

    Indicates whether the trail renderer is currently emitting particles. Unity's TrailRenderer.emitting Documentation

    endColor

    ClientOnly

    Specifies the color of the trail at its end. Unity's TrailRenderer.endColor Documentation

    endWidth

    number
    ClientOnly

    Specifies the ending width of the trail at its tip. Unity's TrailRenderer.endWidth Documentation

    generateLightingData

    boolean
    ClientOnly

    Enables or disables the generation of lighting data for the trail. Unity's TrailRenderer.generateLightingData Documentation

    minVertexDistance

    number
    ClientOnly

    Defines the minimum distance between consecutive vertices in the trail. Unity's TrailRenderer.minVertexDistance Documentation

    numCapVertices

    number
    ClientOnly

    Specifies the number of vertices for each cap of the trail. Unity's TrailRenderer.numCapVertices Documentation

    numCornerVertices

    number
    ClientOnly

    Sets the number of vertices to use for each corner of the trail. Unity's TrailRenderer.numCornerVertices Documentation

    positionCount

    number
    ClientOnly
    ReadOnly

    Provides the number of positions in the trail's vertex array. Unity's TrailRenderer.positionCount Documentation

    shadowBias

    number
    ClientOnly

    Adjusts the distance of the shadow cast by the trail from the visible geometry. Unity's TrailRenderer.shadowBias Documentation

    startColor

    ClientOnly

    Determines the color of the trail at its start. Unity's TrailRenderer.startColor Documentation

    startWidth

    number
    ClientOnly

    Determines the starting width of the trail at its base. Unity's TrailRenderer.startWidth Documentation

    Sets the tiling of the trail's texture along its length. Unity's TrailRenderer.textureScale Documentation

    time

    number
    ClientOnly

    Retrieves or sets the duration in seconds that the trail takes to fade away completely. Unity's TrailRenderer.time Documentation

    Defines a curve that modifies the width of the trail along its length. Unity's TrailRenderer.widthCurve Documentation

    widthMultiplier

    number
    ClientOnly

    Scales the width of the trail uniformly. Unity's TrailRenderer.widthMultiplier Documentation

    Methods

    AddPosition

    ClientOnly

    Adds a new position to the trail, creating a continuous line. Unity's TrailRenderer.AddPosition Documentation

    Parameters

    position

    The new position to add.

    Returns

    void

    BakeMesh

    ClientOnly

    Generates a mesh based on the current trail configuration. Unity's TrailRenderer.BakeMesh Documentation

    Parameters

    mesh

    The mesh to bake the trail into.

    camera
    useTransform
    boolean

    Flag indicating whether to transform the mesh into world space.

    Returns

    void

    BakeMesh

    ClientOnly

    Generates a mesh based on the current trail configuration. Unity's TrailRenderer.BakeMesh Documentation

    Parameters

    mesh

    The mesh to bake the trail into.

    camera
    useTransform
    boolean
    optional

    Flag indicating whether to transform the mesh into world space.

    Returns

    void

    BakeMesh

    ClientOnly

    Generates a mesh based on the current trail configuration. Unity's TrailRenderer.BakeMesh Documentation

    Parameters

    mesh

    The mesh to bake the trail into.

    useTransform
    boolean
    optional

    Flag indicating whether to transform the mesh into world space.

    Returns

    void

    Clear

    ClientOnly

    Clears all positions and resets the trail to its initial state. Unity's TrailRenderer.Clear Documentation

    Returns

    void

    GetPosition

    ClientOnly

    Retrieves the position of a vertex in the trail. Unity's TrailRenderer.GetPosition Documentation

    Parameters

    index
    number

    The index of the vertex to retrieve.

    Returns

    The position of the specified vertex.

    SetPosition

    ClientOnly

    Updates the position of a specific vertex in the trail. Unity's TrailRenderer.SetPosition Documentation

    Parameters

    index
    number

    The index of the vertex to update.

    position

    The new position for the vertex.

    Returns

    void

    Updated 9 days ago

    PocketWorlds Icon

    © 2025 Pocket Worlds. All rights reserved.