Exemplo n.º 1
0
 public static void  OOCCDDOCCO()
 {
     if (GetEasyRoads3DObjects())
     {
         OQCDOODQQQ.OOCCDDOCCO(Selection.activeGameObject);
     }
     else
     {
         EditorUtility.DisplayDialog("Alert", "No EasyRoads3D objects found! Terrain functions cannot be accessed!", "Close");
     }
 }
Exemplo n.º 2
0
 public static void  RestoreAllData()
 {
     if (GetEasyRoads3DObjects())
     {
         OOQDDDCQDD.OQOCDQQDQD(Selection.activeGameObject);
         OQCDOODQQQ.OOCCQCQCQQ(true, 100, 4, "", Selection.activeGameObject);
         OOQDDDCQDD.OOQOQQDQOQ(Selection.activeGameObject);
     }
     else
     {
         EditorUtility.DisplayDialog("Alert", "No EasyRoads3D objects found! Terrain functions cannot be accessed!", "Close");
     }
 }
Exemplo n.º 3
0
 public static void  GetAllData()
 {
     if (GetEasyRoads3DObjects())
     {
         OOQDDDCQDD.ODQDQDDDOD(Selection.activeGameObject);
         OQCDOODQQQ.OOCCDDOCCO(Selection.activeGameObject);
         OOQDDDCQDD.OCDDOCQQCO(Selection.activeGameObject, null, "");
     }
     else
     {
         EditorUtility.DisplayDialog("Alert", "No EasyRoads3D objects found! Terrain functions cannot be accessed!", "Close");
     }
 }
Exemplo n.º 4
0
    public static void  ODQCOCCOOO()
    {
        if (GetEasyRoads3DObjects())
        {
            string path = "";
            if (EditorUtility.DisplayDialog("Road Splatmap", "Would you like to merge the terrain splatmap(s) with a road splatmap?", "Yes", "No"))
            {
                path = EditorUtility.OpenFilePanel("Select png road splatmap texture", "", "png");
            }


            OQCDOODQQQ.OOCCQCQCQQ(true, 100, 4, path, Selection.activeGameObject);
        }
        else
        {
            EditorUtility.DisplayDialog("Alert", "No EasyRoads3D objects found! Terrain functions cannot be accessed!", "Close");
        }
    }
    public void ODOODDDODD(Transform tr, List <ODODDQQO> arr, String[] DOODQOQO, String[] OODDQOQO)
    {
        version    = "2.5.4";
        OODCOCOOCC = (GUISkin)Resources.Load("ER3DSkin", typeof(GUISkin));


        OQQOCCQOOC = (Texture2D)Resources.Load("ER3DLogo", typeof(Texture2D));
        if (RoadObjectScript.objectStrings == null)
        {
            RoadObjectScript.objectStrings    = new string[3];
            RoadObjectScript.objectStrings[0] = "Road Object"; RoadObjectScript.objectStrings[1] = "River Object"; RoadObjectScript.objectStrings[2] = "Procedural Mesh Object";
        }
        obj        = tr;
        OQCODQCQOC = new OCQCDCCDOC();
        ODOOCQDQCD = obj.GetComponent <RoadObjectScript>();
        foreach (Transform child in obj)
        {
            if (child.name == "Markers")
            {
                OCCQOQDDDO = child;
            }
        }
        RoadObjectScript[] rscrpts = (RoadObjectScript[])FindObjectsOfType(typeof(RoadObjectScript));
        OCQCDCCDOC.terrainList.Clear();
        Terrain[] terrains = (Terrain[])FindObjectsOfType(typeof(Terrain));
        foreach (Terrain terrain in terrains)
        {
            Terrains t = new Terrains();
            t.terrain = terrain;
            if (!terrain.gameObject.GetComponent <EasyRoads3DTerrainID>())
            {
                EasyRoads3DTerrainID terrainscript = (EasyRoads3DTerrainID)terrain.gameObject.AddComponent("EasyRoads3DTerrainID");
                string id = UnityEngine.Random.Range(100000000, 999999999).ToString();
                terrainscript.terrainid = id;
                t.id = id;
            }
            else
            {
                t.id = terrain.gameObject.GetComponent <EasyRoads3DTerrainID>().terrainid;
            }
            OQCODQCQOC.OQOOCOCDDQ(t);
        }
        OQCDOODQQQ.OQOOCOCDDQ();
        if (roadMaterialEdit == null)
        {
            roadMaterialEdit = (Material)Resources.Load("materials/roadMaterialEdit", typeof(Material));
        }
        if (objectType == 0 && GameObject.Find(gameObject.name + "/road") == null)
        {
            GameObject road = new GameObject("road");
            road.transform.parent = transform;
        }

        OQCODQCQOC.OQQDOCCQCD(obj, OCDQCCOCOC, ODOOCQDQCD.roadWidth, surfaceOpacity, out ODQQCDQDQD, out indent, applyAnimation, waveSize, waveHeight);
        OQCODQCQOC.ODDQODQCOO       = ODDQODQCOO;
        OQCODQCQOC.OCOCODCCDD       = OCOCODCCDD;
        OQCODQCQOC.OdQODQOD         = OdQODQOD + 1;
        OQCODQCQOC.OOQQQDOD         = OOQQQDOD;
        OQCODQCQOC.OOQQQDODOffset   = OOQQQDODOffset;
        OQCODQCQOC.OOQQQDODLength   = OOQQQDODLength;
        OQCODQCQOC.objectType       = objectType;
        OQCODQCQOC.snapY            = snapY;
        OQCODQCQOC.terrainRendered  = OOCQCCQOQQ;
        OQCODQCQOC.handleVegetation = handleVegetation;
        OQCODQCQOC.raise            = raise;
        OQCODQCQOC.roadResolution   = roadResolution;
        OQCODQCQOC.multipleTerrains = multipleTerrains;
        OQCODQCQOC.editRestore      = editRestore;
        OQCODQCQOC.roadMaterialEdit = roadMaterialEdit;
        OQCODQCQOC.renderRoad       = renderRoad;
        OQCODQCQOC.rscrpts          = rscrpts.Length;

        if (backupLocation == 0)
        {
            OOCDCOQDQC.backupFolder = "/EasyRoads3D";
        }
        else
        {
            OOCDCOQDQC.backupFolder = "/Assets/EasyRoads3D/backups";
        }

        ODODQOQO    = OQCODQCQOC.ODDDCOQDCC();
        ODODQOQOInt = OQCODQCQOC.OCDDCDCCQD();


        if (OOCQCCQOQQ)
        {
            doRestore = true;
        }


        ODDCCCQCOC();

        if (arr != null || ODODQOOQ == null)
        {
            OOCQQQQQQQ(arr, DOODQOQO, OODDQOQO);
        }


        if (doRestore)
        {
            return;
        }
    }