Esempio n. 1
0
        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();
        }
Esempio n. 2
0
        void adjustCables(Plot3 plot)
        {
            var cablesets = plot.GetComponentsInChildren <PlotPartCableset3>();

            foreach (var cableset in cablesets)
            {
                cableset.adjustCablePositions();
            }
        }
Esempio n. 3
0
        void resetEditorMesh(Plot3 plot)
        {
            var eos = plot.GetComponentsInChildren <EditorOnlyObject>(true);

            foreach (var eo in eos)
            {
                DestroyImmediate(eo.gameObject);
            }
        }
Esempio n. 4
0
        void createEditorMesh(Plot3 plot)
        {
            var paths = plot.GetComponentsInChildren <PathSegment3>();

            foreach (var path in paths)
            {
                path.buildInEditor();
            }
        }