public void Generate() { poly = JohnsonPoly.Polygon(sides); poly = poly.Loft(new OpParams(0.5f)); var gableSel = FaceSelections.Existing; for (int i = 0; i < Iterations; i++) { poly = poly.Gable(new OpParams(Bud1, Bud2, FaceSelections.Existing)); poly.ClearTags(); var newFaces = poly.GetFaceSelection(FaceSelections.New); poly.TagFaces("fork1", filter: x => x.index == newFaces.FirstOrDefault(), introvert: true); poly.TagFaces("fork2", filter: x => x.index == newFaces.LastOrDefault(), introvert: true); poly = poly.Loft(new OpParams(BranchLengthScale, BranchLength, FaceSelections.New)); // poly = poly.Loft(new OpParams((5f-i)/10f, (BranchLength-i)/BranchLengthScale, FaceSelections.New)); poly = poly.FaceSlide(new OpParams(amount1, direction1 * i, selectByTags: "fork1")); poly = poly.FaceSlide(new OpParams(amount2, direction2 * i, selectByTags: "fork2")); } // poly = poly.Transform(Position, Rotation, Scale); var mesh = PolyMeshBuilder.BuildMeshFromConwayPoly(poly, false, null, ColorMethod); GetComponent <MeshFilter>().mesh = mesh; }