private void InitSetting() { if (Setting == null) { Setting = MeshCombinerSetting.Instance; } if (Setting == null) { Setting = this.gameObject.AddComponent <MeshCombinerSetting>(); } }
void Awake() { Instance = this; if (NoLimit) { indexFormat = UnityEngine.Rendering.IndexFormat.UInt32; MaxVertex = int.MaxValue; } else { if (MaxVertex > 65535) { indexFormat = UnityEngine.Rendering.IndexFormat.UInt32; } } CombinedMesh.indexFormat = indexFormat; CombinedMesh.MaxVertex = MaxVertex; }