Setup
beginner conceptsThis page covers the component requirements and basic setup for adding Trails FX to GameObjects and characters.
Component Requirements
| Object Type | Required Component | Notes |
|---|---|---|
| Regular GameObject | MeshFilter | The MeshFilter must be on the same GameObject as TrailEffect |
| Character / Skinned mesh | SkinnedMeshRenderer | Add TrailEffect to the same GameObject as the renderer |
Adding Trail Effect
- Select the target GameObject in the Hierarchy.
- Click Add Component in the Inspector.
- Search for Trail Effect and add it.
- Configure the trail style and trigger settings (see Trail Effect Settings).
Using Profiles
Profiles let you save and reuse trail configurations across multiple objects:
- On any
TrailEffectcomponent, click the Create button next to the Profile field. - A new
TrailEffectProfileasset is created with the current settings. - Drag the profile asset into the Profile field of other
TrailEffectcomponents to share settings.
Multi-Part Characters
For characters with multiple body parts that each need trails (e.g., armor pieces on a character):
- Add a
TrailEffectcomponent to each body part that should render a trail. Each part can have its own visual properties. - Designate one trail as the master (e.g., the body). Assign this master trail to the Parent field on the other parts.
- On the master trail, when using Draw Behind, enable Hierarchy Occluder to prevent trails from rendering over the character.
- Leave Clear Stencil disabled unless you have overlapping trails from different characters that need clean stencil state.
Tip: Enable Execute In Edit Mode on the TrailEffect component to preview trails without entering Play mode.
Target Override
By default, Trails FX creates trails from the GameObject it is attached to. You can specify a different target by assigning a GameObject to the Target field. This is useful when you want to control trail generation from a parent script while the visual target is a child object.
Was this page helpful?
Suggest an improvement
Help us improve this documentation page.