当前位置: 首页 > 后端技术 > PHP

游戏设置、辅助开发API

时间:2023-03-29 14:52:34 PHP

野子电竞数据官网改版https://www.xxe.io/全新登场Screen利用屏幕长宽实现更完美的UI适配//ScreenresolutionResolutionresolution=Screen.currentResolution;//游戏运行FullscreenScreen.fullScreen=true;//屏幕高、宽intscreenHeight=Screen.height;intscreenWidth=Screen.width;//不停屏Screen.sleepTimeout=SleepTimeout.NeverSleep;AplacationreadaboutApplication.dataPathandrelatedresources拿去,推荐Unity3D移动平台动态读取外部文件全解析https://www.xxe.io///设置游戏的目标帧率,-1表示不限制,使用最快的帧率Application.targetFrameRate=-1;//用浏览器打开链接Application.OpenURL("URL");//退出APPApplication.Quit();//Assets文件夹路径stringpath=Application.dataPath;//设置是否后台运行Application.runInBackground=true;//获取系统语言SystemLanguagesystemLanguage=Application.systemLanguage;//获取版本号stringunityVersion=Application.version;//网络类型(无网络/3G4G/WIFI)NetworkReachabilitynetworkReachability=Application.internetReachability;DateTime//电量,电池状态floatbatteryLevel=SystemInfo.电池电量;字符串batteryStatus=SystemInfo.batteryStatus.ToString();//设备型号、名称、类型stringdeviceModel=SystemInfo.deviceModel;stringdeviceName=SystemInfo.deviceName;字符串deviceType=SystemInfo.deviceType.ToString();