Sprite Factory

ReadMe
Release Notes
Overview
Using the Editor
Upgrading

Concepts
Sprites
Master Sprites
Sprite Groups
Colliders
Locators
Material Sets
SpriteUpdater
SpriteCamera

Advanced
Working in Multiple Projects

Classes
Runtime Classes

Videos
Overview
Creating Sprites
Sprite Inspector
Frame Events
Collision System
Locator System
Material Sets

Links
Sprite Factory Site
Web Documentation
Support
Contact

Master Sprites

A Master Sprite is a template for a sprite that contains all the necessary data for animation. All sprites, whether scene objects or prefabs, must reference a Master Sprite from which they will load their data on Awake().

Static or Animated
Master Sprites can be static or animated. Static sprites have no animation and consist of a single frame. You can use static sprites for non-animated background elements, for example. Static sprites are faster than animated sprites, so if you have a sprite with only one frame, make it a static sprite. Note that you will almost always want to assign static sprites to groups as a static sprite outside a group would generate an atlas with only one frame wasting memory. See Using the Editor - Sprite Properties for how to set this property.

Texture Atlasing
Texture atlases are generated automatically for every Master Sprite. Atlases will be created on save if animations and frames are defined.

Sprite Groups
A Master Sprite can exist as an independent sprite with its own private atlases, or as a member of a Sprite Group and share atlases and materials with other Master Sprites to save memory and draw calls. See Sprite Groups for more information.

Colliders
Define any number of static or animated box colliders in the sprite. This collider system provides an easy way to add colliders that match the animation of your sprites. See Colliders for more information.

Locators
Define any number of locators, which is an animatable transform on a sprite which can be used for attaching objects or as an origin point for spawning objects. See Locators for more information.

Material Sets
If you need to swap materials on a sprite for any reason (effects, etc.), material sets allow you to create any number of materials and swap them on the fly without incurring excess draw calls. See Material Sets for more information.

Mesh Types
Sprites can use a standard rectangular mesh or an automatically-generated mesh shaped to fit the sprite to reduce overdraw. You can customize the mesh type and mesh generation settings globally and for each sprite individually

How Master Sprites Work
When a Sprite is instantiated, the animation data is loaded from its Master Sprite. This has some useful implications:

Because of this system, there are a few things to be aware of during development:

Creating a Master Sprite
Master Sprites are created and managed in the Sprite Factory editor window. See Using the Editor - Master Sprites for more information.