skip to Main Content

Scripting Support (C#)

Trails FX is designed to be easy to use with the inspector.

If you need to add or change certain values at runtime you can use this code:

TrailsFX.TrailEffect trail = myGameObject.GetComponent<TrailsFX.TrailEffect>();

trail.Clear() : clears any existing trail and restarts the cycle.

trail.Restart() : restarts the trail cycle but keeps exsiting trail.

trail.xxxx = value; (you can change any property shown in the inspector). Check out the TrailEffect code for a list of properties.

trail.UpdateMaterialProperties() : refresh material settings (call this after changing any property using code)
Back To Top