GrassLandShootBooter.cs 957 B

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