//安卓版本的可以旋转屏幕
if (Application.platform == RuntimePlatform.Android)
{
Screen.orientation = ScreenOrientation.AutoRotation;
/// 下面几个bool值设置了是否可以翻转到某个方向。false代表是禁止
Screen.autorotateToLandscapeLeft = true;
Screen.autorotateToLandscapeRight = true;
Screen.autorotateToPortrait = false;
Screen.autorotateToPortraitUpsideDown = false;
}
Screen.sleepTimeout = SleepTimeout.NeverSleep;
Application.runInBackground = true;
Application.targetFrameRate = 20;