using System.Collections; using System.Collections.Generic; using UnityEngine; public class GameEntry : MonoBehaviour { void Awake() { ////设置新装app初始语言 //int curAppLanguage = PlayerPrefs.GetInt("AppLanguage", -1); //if (curAppLanguage != CommonConfig.AppLanguage) //{ // PlayerPrefs.SetInt("AppLanguage", CommonConfig.AppLanguage); // PlayerPrefs.SetInt("Language", CommonConfig.AppLanguage); // Debug.Log("SetAppLanguage"); //} PlayerPrefs.SetInt("AppLanguage", 0); PlayerPrefs.SetInt("Language", 0); Screen.orientation = ScreenOrientation.AutoRotation;//设置方向为自动(根据需要自动旋转屏幕朝向任何启用的方向。) Screen.autorotateToLandscapeRight = true; //允许自动旋转到右横屏 Screen.autorotateToLandscapeLeft = true; //允许自动旋转到左横屏 Screen.autorotateToPortrait = false; //不允许自动旋转到纵向 Screen.autorotateToPortraitUpsideDown = false; //不允许自动旋转到纵向上下 Screen.sleepTimeout = SleepTimeout.NeverSleep; //睡眠时间为从不睡眠 //游戏帧率设置,需要在项目设置的Quality中关闭对应画质的垂直同步(VSync选项) QualitySettings.vSyncCount = 0; Application.targetFrameRate = 60; //QualitySettings.vSyncCount = 1; SimulateMouseController.Init(); } }