unity性能优化小技巧【一】

1.了解设备硬件信息

        //设备的模型

        GetMessage("设备模型", SystemInfo.deviceModel);

        //设备的名称

        GetMessage("设备名称", SystemInfo.deviceName);

        //设备的类型

        GetMessage("设备类型(PC电脑,掌上型)", SystemInfo.deviceType.ToString());

        //系统内存大小

        GetMessage("系统内存大小MB", SystemInfo.systemMemorySize.ToString());

        //操作系统

        GetMessage("操作系统", SystemInfo.operatingSystem);

        //设备的唯一标识符

        GetMessage("设备唯一标识符", SystemInfo.deviceUniqueIdentifier);

        //显卡设备标识ID

        GetMessage("显卡ID", SystemInfo.graphicsDeviceID.ToString());

        //显卡名称

        GetMessage("显卡名称", SystemInfo.graphicsDeviceName);

        //显卡类型

        GetMessage("显卡类型", SystemInfo.graphicsDeviceType.ToString());

        //显卡供应商

        GetMessage("显卡供应商", SystemInfo.graphicsDeviceVendor);

        //显卡供应唯一ID

        GetMessage("显卡供应唯一ID", SystemInfo.graphicsDeviceVendorID.ToString());

        //显卡版本号

        GetMessage("显卡版本号", SystemInfo.graphicsDeviceVersion);

        //显卡内存大小

        GetMessage("显存大小MB", SystemInfo.graphicsMemorySize.ToString());

        //显卡是否支持多线程渲染

        GetMessage("显卡是否支持多线程渲染", SystemInfo.graphicsMultiThreaded.ToString());

        //支持的渲染目标数量

        GetMessage("支持的渲染目标数量",             
        SystemInfo.supportedRenderTargetCount.ToString());

2.选择合适API  ----in Player Settings

Player Settings

3.如没有x86需求取消勾选(减少包体)----in Player Settings

Player Settings

4.Blit Type (Never明显提高6-7FPS,3D模型和渲染光照少可用,需实际测试渲染效果) ----in Player Settings

Landscape Left画面左旋转

Player Settings

5.正式发布选li2cpp打包,运行效率快  ----in Player Settings

Player Settings

6.设置成Disabled(不然有很多dll文件就这样被删减,导致用不了)  ----in Player Settings

Player Settings

7.需要导出Android,进行unity与Android交互选择Gradle

无需要请用Internal(加快导出时间)

包体大小: 默认 <  LZ4HC < LZ4

解压速度: 默认 < LZ4HC < LZ4

Build Setting

8.Quality Setting设置(注意项目的1灯光数2贴图质量3阴影显示4骨骼数量5垂直同步)

Quality Setting

9.Lighting Setting优化(纯2D场景)

Lighting Setting

10.streamingassets文件夹路径(Unity5.x与Unity2018区别)

Unity5.x

Unity2018

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值