(一)问题 项目开发中常会有开多个分支,同时启动多个 Unity 程序的情况,来回切换的时候就容易混淆,有时候还需要用 Show In Explorer 或者其他标志来确认当前使用的是哪个分支. 于是想在标题栏上直接显示出当前的工作目录: 修改前: 原本的标题栏由项目名.场景.工作平台等文本组成 修改后: 额外显示工作路径 (二)代码 1. 声明要调用的系统接口 using System; using System.Runtime.InteropServices; using System.Te
只允许竖屏: Portrait √ Portrait Upside Down √ Landscape Right × Landscape Left × 只允许横屏: Portrait × Portrait Upside Down × Landscape Right √ Landscape Left √ 代码动态设置屏幕旋转: private void set
在res/values目录下的style.xml设置如下 <style name="AppBaseTheme" parent="android:Theme.Wallpaper.NoTitleBar"> <resources> <!-- Base application theme, dependent on API level. This theme is replaced by AppBaseTheme from res/values