MeshDraft GenerateMesh() { float radius = 1f; MeshDraft draft = MeshDraft.Octahedron(radius); // Randomize Colors int numColors = draft.vertices.Count; draft.colors.Clear(); for (int i = 0; i < numColors; i++) { draft.colors.Add(RandomE.colorHSV); } return(draft); }
private void Start() { GetComponent <MeshFilter>().mesh = MeshDraft.Octahedron(radius).ToMesh(); }
public static void Octahedron() { PrimitiveTemplate(octahedron, () => MeshDraft.Octahedron(1).ToMesh()); }