Add a SpriteTrail component to the scene object contains SpriteRenderer.
By adding this component to the GameObject that contains the SpriteRenderer can make trail of sprite.
The Light2DSource component has following options.
|Method||Set to Time to emit trail at specific interval or Distance to emit trail at specific distance.|
|Spacing||Property to set sprite spacing distance.|
|Interval||Property that sets the sprite emitted seconds.|
|Only When Moved||If checked, accumulates time only when the object is moved.|
|LifeTime||Define the lifetime of the trail, measured in seconds.|
|Color over LifeTime||Color and Alpha changes during lifetime.|
|Color Type||Static color or Gradient color during lifetime.|
|Color||Static color during lifetime.|
|Alpha Multiplier Curve||Alpha multiplication during lifetime.|
|Gradient||Curve of change in color and alpha values over a lifetime.|
|Scale Multiplier||Scale multiplication changes during lifetime.|
|Vector2||Scale multiplication of the original SpriteRenderer.|
|Scale on X, Y||Scale multiplication curve over a lifetime.|
|Override Material||Material of the trail. If it is empty the material used by the SpriteRenderer.|
|Hide In Hierachy||Hide trail objects in Hierachy. (Recommended)|
|Remove On Disabled||As soon as the object is enabled, it prepares to create a trail. If it is not checked, call Play() when needed.|
|Play On Awake||As soon as the object is enabled, it prepares to create a trail. If it is not checked, call Play() when needed.|
|Emit()||Emit trail at current position and rotation manually.|
|Emit(TrailProperties)||Emit trail at current position and rotation manually with specific properties.|
|Emit(TrailPropertyAsset)||Emit trail at current position and rotation manually with specific property asset.|
|Emit(Vector2, Quaternion, TrailProperties)||Emit trail at specific position and rotation with properties.|
|RemoveAll()||Remove all emitted trails.|
|Play()||Activate SpriteTrail script.|
|Stop()||Deactivate SpriteTrail script.|
You can save the properties externally by selecting the “Export Properties” button on SpriteTrail. By assigning this stored property asset to SpriteTrail’s “Property Asset” field. As a result, you can use the same properties for multiple trails with a single property asset.