public static Mesh GetPrimitiveMesh(PrimitiveType type) { if (!PrimitiveHelper.primitiveMeshes.ContainsKey(type)) { PrimitiveHelper.CreatePrimitiveMesh(type); } return(PrimitiveHelper.primitiveMeshes[type]); }
public static Mesh GetPrimitiveMesh(PrimitiveType type, bool rotate = false, string path = "") { if (rotate) { if (!PrimitiveHelper.primitiveRotateMeshes.ContainsKey(type)) { PrimitiveHelper.CreatePrimitiveMesh(type, rotate, path); } return(PrimitiveHelper.primitiveRotateMeshes[type]); } else { if (!PrimitiveHelper.primitiveMeshes.ContainsKey(type)) { PrimitiveHelper.CreatePrimitiveMesh(type, rotate); } return(PrimitiveHelper.primitiveMeshes[type]); } }