Game Development Reference
In-Depth Information
Sprites
In 2D, sprites are simple images that generally depict a single object (for example, a char-
acter) or scene (for example, background). Several sprites can also be made for a single
object in the individual frames for that object to create an animation. Refer to the follow-
ing screenshot:
At the core of the new 2D system is the new sprite texture importer, which imports your
texture assets and prepares them as sprites in your project folder. When dragged on to
your scene, they are automatically given a new Sprite Renderer object (refer to the next
section) that is ready to be displayed in your game; no additional lighting or work is re-
quired.
As you would expect, you can alter most of the characteristics of your sprite, including the
following characteristics:
• Scaling
• Pivot point
• Sprite region on texture
All of the previous characteristics can be modified straight from the editor or at runtime
through code or by using the new animation dope sheet.
By default, each texture is imported as a single sprite; however, by using the Sprite Edit-
or (refer to the Sprite Editor section), you can change this in various ways. These are
covered in the next sections.
Search WWH ::




Custom Search