Camera setup question


I'm trying to set up Unity for 2D+ development similar to how I set up OpenGL -- ortho camera and planes/rects with textures. Sounds easy enough.

I need a solution which guarantees that a bitmap that's (for example) 30x60 in Photoshop shows up EXACTLY as 30x60 within Unity screen space. How do I compute Camera parameters to ensure that result? There's probably some known formulaic approach, but I'm not sure how to apply it to the given parameters.

The Camera parameters I can play with appear to be "Scale" (which I left at 1,1,1) and "Size" (which I don't understand and the documentation doesn't explain very much). Through trial & error (try a number, run program, screen capture, measure, repeat) I've arrived at a "magic" value of 30 which seems close to correct, but I'd much prefer a more definitive approach.

Thanks, BT

  1. Orthographic size = Screen.Height/2
  2. Set camera.position to 0,0,0 or if you don't want the item.position(0,0,0) to be the upper left, then offset the camera.position by ( -w/2, -h/2, )

Any other ideas?