_____ __ ______ __________ _____ ____ ____ ________________ __________ ___ ______ / ___// / / / __ \/ ____/ __ \ / ___// __ \/ __ \/ _/_ __/ ____/ /_ __/ __ \/ | / _/ / \__ \/ / / / /_/ / __/ / /_/ / \__ \/ /_/ / /_/ // / / / / __/ / / / /_/ / /| | / // / ___/ / /_/ / ____/ /___/ _, _/ ___/ / ____/ _, _// / / / / /___ / / / _, _/ ___ |_/ // /___ /____/\____/_/ /_____/_/ |_| /____/_/ /_/ |_/___/ /_/ /_____/ /_/ /_/ |_/_/ |_/___/_____/ ___________ ________ _____ ________ / __/ __/ _ /_ __/ / / / _ \/ __/ __/ / _// _// __ |/ / / /_/ / , _/ _/_\ \ /_/ /___/_/ |_/_/ \____/_/|_/___/___/ Draws trails using Sprite Renderers, using object pooling to keep CPU low. Allows different trail length. Trail color is defined with a gradient. Options for velocity/acceleration for trails on non-moving sprites. Toggle for which update cycle will be used. (Update, LateUpdate, and FixedUpdate) Lots of other settings & tweaks to get trails looking the way you want. Custom silhouette shader. __ ______ _ __ __________ __ __________ / // / __ \ | /| / / /_ __/ __ \ / / / / __/ __/ / _ / /_/ / |/ |/ / / / / /_/ / / /_/ /\ \/ _/ /_//_/\____/|__/|__/ /_/ \____/ \____/___/___/ Super Sprite Trail can be added to any GameObject, through Unity's component menu. (Component > Effects > Super Sprite Trail) You can also add it to a GameObject through the inspector, with the "Add Component" button at the bottom. When added to an object with a Sprite Renderer already on it, the Super Sprite Trail component will automatically grab it to use as its reference sprite renderer. You can change this, or assign it manually by dragging a Sprite Renderer, or an object with one attached, into the component's "Sprite Renderer" slot. Each variable in the inspector has tooltips attached to it that explain what they do! Included shaders can be found in "Assets > Clavian > SuperSpriteTrail > Shaders". The "Silhouette" shader, when given to a sprite trail causes only one color (and transparency) to be shown on the sprite. The "CutColor" shader is more conditional, and can replace one color with another on a sprite. (Replacing a black outline with transparency, for instance.) The "Away From Camera" variable is meant for games that have a top-down view. (Legend of Zelda, etc) When the sprite renderer moves in this direction, the trail will draw on TOP of the player instead of behind. You can disable this by setting the value to "None". In the sample scene, try checking the "Movement Is 3D" box to get a look at how the "Away From Camera" variable works, in action. PUBLIC FUNCTIONS AND IMPORTANT VARIABLES void SuperSpriteTrail.PoolObjects() Forces Super Sprite Trail to redraw. See below for when this should be called. void SuperSpriteTrail.Clear() Clears all existing trails. int SuperSpriteTrail.trailLength [0 to ...] Defines how long a trail will last, in frames. You should use the accessor "TrailLength" below instead, unless you're using a plugin that doesn't work with accessors. If so, make sure to call PoolObjects() afterwards. int SuperSpriteTrail.TrailLength [0 to ...] An accessor for trailLength, if you use this to set trailLength, PoolObjects() will automatically be called after. bool SuperSpriteTrail.isActive Controls if trails will be produced or not. Existing trails will not be cleared if set to false. All other public variables can be changed at runtime with code! _ ______ ______________ / |/ / __ \/_ __/ __/ __/ / / /_/ / / / / _/_\ \ /_/|_/\____/ /_/ /___/___/ "Blend With Sprite Color" using multiplication to blend right now, so it might look strange on non-white-colored sprites, or non-white gradients. ________ _______ ______________ / ___/ _ \/ __/ _ \/ _/_ __/ __/ / /__/ , _/ _// // // / / / _\ \ \___/_/|_/___/____/___/ /_/ /___/ Coding by Kai Clavier (http://kaiclavier.com) Lovely ASCII text from http://patorjk.com/software/taag/