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.ScaleToActualPixelSize

C#: void ScaleToActualPixelSize (Camera camera)
JS: function ScaleToActualPixelSize (camera : Camera) : void

Description
Scale Sprite so that 1 texel equals 1 screen pixel as viewed by the camera passed to the function. The camera must be set to orthographic mode for this to work.

* IMPORTANT *
This actually scales the Sprite's transform in order to match the pixel size. This could have a number of potentially unwanted side effects because while the Sprite scales, things such as movement speeds and distances to other objects does not. If your intention is to display all the Sprites on the screen at actual pixel size, you do not want to use this setting. Instead, you should add a SpriteCamera to the scene and use this camera for rendering.

See Also
scaleToActualPixelSize