Scripting API

TrailRenderer

class in UnityEngine · UnityEngine.CoreModule · inherits from LineRendererBase

31 of 31 of Unity's membersUnity's documentation
In Tassix

Leaves a line behind its object as it moves. The trail starts where its object was at the end of the frame it was made; once the object moves, that point and then every position at least minVertexDistance from the last are kept, newest last, until the point after them is older than time. The trail catches up with its object whenever it's read and once a frame; it's drawn from the object back to the oldest point, whose end slides toward the next as it fades.

Properties 5

bool autodestruct { get; set; }
bool emitting { get; set; }

Turning emitting off first takes the object's latest position, then ends the trail there.

float minVertexDistance { get; set; }
int positionCount { get; }
float time { get; set; }

Methods 8

void AddPosition(Vector3 position)
void AddPositions(Vector3[] positions)
void Clear()
Vector3 GetPosition(int index)
int GetPositions(Vector3[] positions)
int GetVisiblePositions(Vector3[] positions)
void SetPosition(int index, Vector3 position)
void SetPositions(Vector3[] positions)

Checked against Unity

Conformance scenarios that exercise it, recorded in Unity and compared event by event.