For 2D game, default camera(orthographic) size is 5 and I am trying to figure out what it should be to get original views of images. What should it be? Because 5 shows the images very smaller than original size.
相关问题
- How to access the camera from my Windows Phone 8 a
- Unity - Get Random Color at Spawning
- I want to read exif info in image in android. I ca
- Android Exclude Some Camera Intent
- Unity3D WebGL Headless not rendering
相关文章
- Programmatically setting and saving the icon assoc
- Omnisharp in VS Code produces a lot of warnings ab
- Call non-static methods on custom Unity Android Pl
- How can a game created in Unity can run on an Andr
- Flutter Camera Preview not rotating with phone ori
- how to calculate field of view of the camera from
- How to add Persistent Listener to Button.onClick e
- Placing an object in front of the camera
First scale the cameras transform to 2/screenHeight, so if you have 1920x1080 screen it should be 2/1080
Then set your cameras orographic size to 1
Then on the sprite, set the "pixels to units" to the height of the image size, so if you have a image of size 128x128 the pixels to units should be 128
Now if you place your sprite as a child to your camera, the scale of the object will be in pixels. so if you want a sprite of size 128x128 to be 128x128 on a 1080 screen just set the scale of the transform to 128,128,0
The bonus of doing it this way is that you design the game for one resolution like 1920x1080 and when you run it on a screen with another resolution (same aspect ratio) you just need to change the 2/screenHeight for the camera and everything will have the same relative size which will make it look the same as long as the aspect ratio is the same.