Pixel Perfect Camera component reference for URP
Explore the different properties available to customize the appearance of your 2D pixel art with the Pixel Perfect Camera.
Read time 3 minutesLast updated 20 days ago
Explore the properties you can use to automatically adjust the camera to scale and rotate pixel art precisely in the Universal Render Pipeline (URP).
For more information, refer to Add a pixel perfect camera and Configure a pixel perfect camera.
Property | Description |
|---|---|
| Asset Pixels Per Unit | Sets how many pixels of width and height in the sprite image correspond to one unit in world space. Set this value to match the Pixels Per Unit values of all the sprites in the scene. |
| Reference Resolution | Sets the screen resolution your sprites are designed for. For example, if you set X to 320 and Y to 180, Unity sets the camera view to 320 sprite pixels in width and 180 sprite pixels in height. |
| Crop Frame | Crops the viewport with black bars to hide the areas beyond the aspect ratio of the Reference Resolution. The options are:
|
| Grid Snapping | Sets how Unity snaps and scales sprites. The options are:
|
| Filter Mode | Sets how Unity stretches the camera view when you set Crop Frame to Stretch Fill. The options are:
|
| Current Pixel Ratio | The ratio of the sprites in the Game view to their original size. For example, 2:1 means the sprites are twice their original size. |