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

Sprite Groups

A Sprite Group is a group of Master Sprites that share atlases thereby saving memory and draw calls.

Creating Sprite Groups
See Using the Editor - Sprite Groups for information.

Moving Sprites In and Out of Sprite Groups
Master Sprites can be moved in and out of groups at will from Sprite Properties -> Sprite Group. Note that when moving a sprite to or from a group, atlases and materials will be rebuilt for both groups which can take some time depending on the number of sprites in each group.

Shared Group Properties
Sprite Groups have certain properties which are shared by all sprites within the group: Atlas Properties and Material Sets. When a sprite is in a group, these properties can no longer be set in the sprite, but must be set in the group instead. When a Sprite Group is first selected in the editor, the Sprite Group properties will be displayed. Using the Editor - Sprite Groups for usage information.

Note about draw calls:
If the frames in all the sprites in a group exceeds the atlas size, multiple atlases will be created to fit all the frames. This is the same way atlasing works in non-grouped sprites. But in a group, for maximum draw call efficiency, you should follow a couple of guidelines:

  1. Group static sprites with static sprites, and animated sprites with animated sprites. Grouping static sprites with animated sprites works, but if the animation has many frames, it may push some static sprites onto other atlas sheets causing the static sprites to not be able to batch their draw calls. For this reason, if you do mix static and animated sprites in a group, its best that you move the animated sprites to the bottom of the group so they will be atlased last after all the static sprites have been atlased onto as few sheets as possible.
  2. Group animated sprites with fewer frames together. Sprites with many frames, like a main character, should probably be standalone sprites (not grouped). This is a very loose suggestion because there may be some cases where you would want to group sprites with many frames, but it all depends on your max atlas size, sprite frame size, and number of frames.