I made a game for smartphones. it is free aspect. I play it on my iphone 4 and it fits fine. but on iphone 5 I can see my skybox behind the game. the gui parts are anchored fine so they work good. but not the game. is there a way to make anchors on my gameobjects that aren’t gui?
Apply this script to your main camera:
using UnityEngine;
using System.Collections;
public class resolution : MonoBehaviour {
private float nearClipPlane = 0.3f ;
private float farClipPlane = 1000;
public float orthographicSize = 5;
public float aspect = 2.25f;
void Start ()
{
Camera.main.projectionMatrix = Matrix4x4.Ortho (
-orthographicSize * aspect, orthographicSize * aspect,
-orthographicSize, orthographicSize,
nearClipPlane, farClipPlane);
}
}
You may need to adjust the values of the orthographic size & aspect size to fit your camera but hopefully that does the trick for you!