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

SpriteCamera

A camera with specific settings for use with Sprites. Specifically, it allows you to automatically display Sprites at the actual pixel size on screen.

Creating a SpriteCamera
There are two ways to create a SpriteCamera:

  1. Create a camera in your scene and add a SpriteCamera component to it.
  2. Drag the SpriteCamera prefab into your scene from Assets/SpriteFactory/Prefabs/SpriteCamera.

Render at Actual Pixel Size
Set the SpriteCamera.renderAtActualPixelSize property of the SpriteCamera component in the inspector to True. The orthographic size setting of the camera will be adjusted to render the Sprites at actual size. You can also set this value via scripting by calling the SpriteCamera.SetCameraToActualPixelSize function.

Resolution Gate
The SpriteCamera component has settings to allow you to view a resolution gate through the camera view. This allows you to see how much content fits on a screen of a particular resolution. This is only for reference and only shows up when viewing through the camera in the Unity editor. These values are set in the inspector when the camera is selected.

Inspector

SpriteCamera Inspector

Render At Actual Pixel Size   Size camera to render Sprites so 1 texel equals 1 pixel on screen.
Adjust For Resolution Target   Enable to render sprites at 1 texel equals 1 pixel taking into account resolution target scaling. Render At Actual Pixel Size must be enabled for this to have any effect.
     
Editor-Only Variables   These variables are only for use in the editor. They have no effect in a final build.
Show Resolution Gate   Display a resolution box on screen to help visualize available screen space.
Resolution Gate Size   The size of the resolution gate displayed on screen.
Rotate Layout   Rotate the resolution gate to portrait or landscape.
Custom Gate Width   Width of the resolution gate if showResolutionGate is set to Custom.
Custom Gate Height   Height of the resolution gate if showResolutionGate is set to Custom.
Resolution Gate Color   Color of the resolution gate.
     
Internal Variables   For internal use only. Do not edit these variables.
GameSettings   Link to the GameSettings file of SpriteFactory. * Do not edit this value. *