Class LegionPixelCamera
- Namespace
- PixelUnitStudio
- Assembly
- PixelUnitStudio.Runtime.dll
Orthographic camera helper that shows pixels crisply regardless of render pipeline (replaces URP's Pixel Perfect Camera). Adjusts orthographicSize so the screen scales only by integer multiples of the reference resolution. One art pixel is always an N×N block of screen pixels. With upscaleRenderTexture on, it draws into a render texture at art resolution and shows it scaled by an integer factor. Then rotated bones and weapons also snap to the pixel grid and the pixel size stays even. The result is the same in Built-in and URP. Sprites must use Point filtering.
public sealed class LegionPixelCamera : MonoBehaviour
- Inheritance
-
LegionPixelCamera
Constructors
LegionPixelCamera()
public LegionPixelCamera()
Fields
pixelsPerUnit
public int pixelsPerUnit
Field Value
referenceResolution
public Vector2Int referenceResolution
Field Value
- Vector2Int
upscaleRenderTexture
public bool upscaleRenderTexture
Field Value
Properties
Scale
Number of screen pixels one art pixel covers on the current screen.
public int Scale { get; }