Пример #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();
        }
Пример #2
0
        void adjustCables(Plot3 plot)
        {
            var cablesets = plot.GetComponentsInChildren <PlotPartCableset3>();

            foreach (var cableset in cablesets)
            {
                cableset.adjustCablePositions();
            }
        }
Пример #3
0
        void resetEditorMesh(Plot3 plot)
        {
            var eos = plot.GetComponentsInChildren <EditorOnlyObject>(true);

            foreach (var eo in eos)
            {
                DestroyImmediate(eo.gameObject);
            }
        }
Пример #4
0
        void createEditorMesh(Plot3 plot)
        {
            var paths = plot.GetComponentsInChildren <PathSegment3>();

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