网格优化:
将多个网格合并为一个网格,即将多个模型合并为一个模型。
如图:
编辑脚本:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// 合并网格
/// </summary>
public class CombineMesh : MonoBehaviour {
void Start () {
GetMesh(transform);
}
/// <summary>
/// 获得网格
/// </summary>
void GetMesh(Transform tf)
{
/