美文网首页Unity专题
动态进行静态批处理优化

动态进行静态批处理优化

作者: _Arturia | 来源:发表于2017-11-22 14:29 被阅读19次

    public class Aab : MonoBehaviour {
    GameObject[] allObjs;

    void Start () {
        allObjs = new GameObject[this.transform.childCount];
    
        for (int i = 0; i < transform.childCount; i++) {
            //this.transform.GetChild (i).name = "TA" + i;
            allObjs[i]=this.transform.GetChild (i).gameObject;
        }
        StaticBatchingUtility.Combine(allObjs, this.gameObject);
    }
    

    }

    此脚本挂在父物体上

    相关文章

      网友评论

        本文标题:动态进行静态批处理优化

        本文链接:https://www.haomeiwen.com/subject/ednnvxtx.html