using System.Collections; using System.Collections.Generic; using UnityEngine; public class CameraFOV : MonoBehaviour { public Camera cam; public Vector2 sizeScreen; public float FOV; float ratioMaking, ratioDevice; private void Start() { Setting(); } public void Setting() { ratioMaking = (sizeScreen.x / sizeScreen.y); ratioDevice = ((float)Screen.width / Screen.height); cam.fieldOfView = FOV * ratioMaking / ratioDevice; } }