zoukankan      html  css  js  c++  java
  • Unity3d Static 静态批处理和动态批处理

    表示物体时静态的,多用于静止不动的物体,此外static有多种,有的用于烘焙,有的用于遮挡剔除
    物理效果是rigidbody组件,和这个没关系,用transform.Translate 无法移动,因为已经把他当做静止物体了

    为了更好地使用静态批处理,你需要明确指出哪些物体是静止的,并且在游戏中永远不会移动、旋转和缩放。想完成这一步,你只需要在检测器(Inspector)中将Static复选框打勾即可,如下图所示:

    动态批处理 就相同材质 相同的缩放值。

      • Don't use scale. Objects with scale (1,1,1) and (2,2,2) won't batch. 
        不要使用缩放。分别拥有缩放大小(1,1,1) 和(2,2,2)的两个物体将不会进行批处理。
      • Uniformly scaled objects won't be batched with non-uniformly scaled ones.
        统一缩放的物体不会与非统一缩放的物体进行批处理。
        • Objects with scale (1,1,1) and (1,2,1) won't be batched. On the other hand (1,2,1) and (1,3,1) will be. 
          使用缩放尺度(1,1,1) 和 (1,2,1)的两个物体将不会进行批处理,但是使用缩放尺度(1,2,1) 和(1,3,1)的两个物体将可以进行批处理。
        • Objects with lightmaps have additional (hidden) material parameter: offset/scale in lightmap, so lightmapped objects won't be batched (unless they point to same portions of lightmap) 
          拥有lightmap的物体含有额外(隐藏)的材质属性,比如:lightmap的偏移和缩放系数等。所以,拥有lightmap的物体将不会进行批处理(除非他们指向lightmap的同一部分)。
  • 相关阅读:
    array_map()与array_shift()搭配使用 PK array_column()函数
    Educational Codeforces Round 8 D. Magic Numbers
    hdu 1171 Big Event in HDU
    hdu 2844 poj 1742 Coins
    hdu 3591 The trouble of Xiaoqian
    hdu 2079 选课时间
    hdu 2191 珍惜现在,感恩生活 多重背包入门题
    hdu 5429 Geometric Progression 高精度浮点数(java版本)
    【BZOJ】1002: [FJOI2007]轮状病毒 递推+高精度
    hdu::1002 A + B Problem II
  • 原文地址:https://www.cnblogs.com/123ing/p/4067230.html
Copyright © 2011-2022 走看看