Esempio n. 1
0
    /// <summary>
    /// Rebilds the mesh based off of the given entities.
    /// </summary>
    /// <param name="entities">The entities to include in this mesh.</param>
    public void Rebuild(T[] entities)
    {
        // update the rendering
        tessellator.Clear();
        RebuildMesh(entities, tessellator);
        tessellator.UpdateMesh();

        // update the mesh collider
        meshCollider.sharedMesh = mesh;
    }