Project_WL/Assets/Script/Util/PCCameraControl.cs

14 lines
447 B
C#
Raw Normal View History

2024-12-15 01:39:39 +00:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PCCameraControl : MonoBehaviour
{
void Awake()
{
var rate = Screen.height / (float)Screen.width;
if (rate < 1.78f) transform.localPosition = new Vector3(0f, 3.1f, -2f);
else if (rate < 2.2f) transform.localPosition = new Vector3(0f, 3.5f, -2f);
else transform.localPosition = new Vector3(0f, 3.9f, -2f);
}
}