Hi, if you have a 960x480 image is there a way in script (or via the editor) way you can align it, so the entire image is displayed perfectly aligned on an iPhone 4 running in HD? I’m currently experimenting with
transform.position = referenceToCamera.ViewportToWorldPoint ( Vector3.zero);
but this doesn’t seem to be working as I intended.
Thanks!
Um. I made a thing a while back for drawing a mesh in front of the camera (which, btw, worked for any aspect ratio), but for what you’re doing, you should just use
GUI.Label(new Rect(0,0, screen.width, screen.height), texture);
This will always align the image perfectly, as you need. The problem with this approach is that it will always appear in front of everything else (except other GUI elements), but that may or may not be a problem.