Draw and configure a trail behind a moving GameObject
Rendering trails for moving GameObjects
Trail Renderer component reference
Draw and configure a trail behind a moving GameObject
To create a Trail RendererA visual effect that lets you to make trails behind GameObjects in the Scene as they move. More info See in Glossary:
In the Unity menu bar, go to GameObject > Effects > Trail.
Select the Trail Renderer GameObjectThe fundamental object in Unity scenes, which can represent characters, props, scenery, cameras, waypoints, and more. A GameObject’s functionality is defined by the Components attached to it. More info See in Glossary, and parent it to the GameObject that you want it to generate a trail for.
Use the InspectorA Unity window that displays information about the currently selected GameObject, asset or project settings, allowing you to inspect and edit the values. More info See in Glossary window to configure the color, width, and other display settings of the trail.
Preview the trail in Edit Mode by moving the GameObject and observing the effect in the SceneA Scene contains the environments and menus of your game. Think of each unique Scene file as a unique level. In each Scene, you place your environments, obstacles, and decorations, essentially designing and building your game in pieces. More info See in Glossary view.
Set the Trail Renderer Material
By default, a Trail Renderer uses the built-in Material, Default-Line. You can make many changes to the appearance of the trail without changing this Material, such as editing the color gradient or width of the trail.
For other effects, such as applying a texture to the trail, you will need to use a different Material. If you do not want to write your own ShaderA program that runs on the GPU. More info See in Glossary for the new Material, Unity’s built-in Standard Particle Shaders work well with Trail Renderers. If you apply a Texture to a Trail Renderer, the Texture should be of square dimensions (for example 256x256, or 512x512).
If you apply more than one Material to a Trail Renderer, the trail is rendered once for each Material.