using System.Collections; using System.Collections.Generic; using UnityEngine; public class GrassLandShootBooter : MonoBehaviour { // Start is called before the first frame update void Start() { Screen.orientation = ScreenOrientation.AutoRotation;//设置方向为自动(根据需要自动旋转屏幕朝向任何启用的方向。) Screen.autorotateToLandscapeRight = true; //允许自动旋转到右横屏 Screen.autorotateToLandscapeLeft = true; //允许自动旋转到左横屏 Screen.autorotateToPortrait = false; //不允许自动旋转到纵向 Screen.autorotateToPortraitUpsideDown = false; //不允许自动旋转到纵向上下 Screen.sleepTimeout = SleepTimeout.NeverSleep; //睡眠时间为从不睡眠 QualitySettings.vSyncCount = 0; Application.targetFrameRate = 60; // QualitySettings.vSyncCount = 1; } }