void fittingTerrain(Plot3 plot) { var district = plot.GetComponentInParent <District3>(); if (district == null) { return; } var tr = district.GetComponentInChildren <Terrain>(); var field = new TerrainOperator(tr); var parts = plot.GetComponentsInChildren <PathSegment3>(); //RoadPart3>(); foreach (var part in parts) { var mcs = part.GetComponentsInChildren <MeshCollider>(); foreach (var mc in mcs) { field.adjustMesh(mc); } } tr.Flush(); }
void adjustCables(Plot3 plot) { var cablesets = plot.GetComponentsInChildren <PlotPartCableset3>(); foreach (var cableset in cablesets) { cableset.adjustCablePositions(); } }
void resetEditorMesh(Plot3 plot) { var eos = plot.GetComponentsInChildren <EditorOnlyObject>(true); foreach (var eo in eos) { DestroyImmediate(eo.gameObject); } }
void createEditorMesh(Plot3 plot) { var paths = plot.GetComponentsInChildren <PathSegment3>(); foreach (var path in paths) { path.buildInEditor(); } }