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

SpriteFactory.Sprite.UpdateSprite

C#: void UpdateSprite ()
JS: function UpdateSprite () : void

Description
The main Sprite update function that updates animation.

In order for Sprites to animate, the UpdateSprite function must be called. There are 3 ways to drive animation:

  1. Set selfUpdate = True on the Sprite and it will run UpdateSprite in the Update function every frame.
  2. Create a SpriteUpdater in the scene and assign the Sprite to it. The SpriteUpdater will update the Sprite in the specified update cycle.
  3. Create a custom script and call Sprite.UpdateSprite() manually.

Take care to update Sprites using only one of the three methods at any time or the Sprite will update multiple times per frame causing problems with speed and timing.

See Also
selfUpdate
SpriteUpdater