Example #1
0
 private void InitSetting()
 {
     if (Setting == null)
     {
         Setting = MeshCombinerSetting.Instance;
     }
     if (Setting == null)
     {
         Setting = this.gameObject.AddComponent <MeshCombinerSetting>();
     }
 }
Example #2
0
    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;
    }