Ejemplo n.º 1
0
    private void Build()
    {
        filter.sharedMesh = ChunkBuilder.BuildChunk(filter.sharedMesh, chunk);

        if (filter.sharedMesh == null)
        {
            Destroy(gameObject);
            return;
        }

        GetComponent <Renderer>().sharedMaterials = blockSet.GetMaterials(filter.sharedMesh.subMeshCount);
    }
 void Awake()
 {
     ChunkBuilder.Init(blockSet.GetMaterials().Length);
 }