Example #1
0
 public static void  OQDCQQCQQD()
 {
     if (GetEasyRoads3DObjects())
     {
         OQOCOOCCQO.OQDCQQCQQD(Selection.activeGameObject);
     }
     else
     {
         EditorUtility.DisplayDialog("Alert", "No EasyRoads3D objects found! Terrain functions cannot be accessed!", "Close");
     }
 }
Example #2
0
 public static void  GetAllData()
 {
     if (GetEasyRoads3DObjects())
     {
         OQQDODDCQC.OODOOQQOOC(Selection.activeGameObject);
         OQOCOOCCQO.OQDCQQCQQD(Selection.activeGameObject);
         OQQDODDCQC.OCQQOODQDD(Selection.activeGameObject, null, "");
     }
     else
     {
         EditorUtility.DisplayDialog("Alert", "No EasyRoads3D objects found! Terrain functions cannot be accessed!", "Close");
     }
 }
Example #3
0
 public static void  RestoreAllData()
 {
     if (GetEasyRoads3DObjects())
     {
         OQQDODDCQC.ODCCDODCOQ(Selection.activeGameObject);
         OQOCOOCCQO.OOOQODCQDD(true, 100, 4, "", Selection.activeGameObject);
         OQQDODDCQC.ODCOOOQCQQ(Selection.activeGameObject);
     }
     else
     {
         EditorUtility.DisplayDialog("Alert", "No EasyRoads3D objects found! Terrain functions cannot be accessed!", "Close");
     }
 }
Example #4
0
    public static void  OOODOQQDOD()
    {
        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");
            }


            OQOCOOCCQO.OOOQODCQDD(true, 100, 4, path, Selection.activeGameObject);
        }
        else
        {
            EditorUtility.DisplayDialog("Alert", "No EasyRoads3D objects found! Terrain functions cannot be accessed!", "Close");
        }
    }
Example #5
0
    public void ODOOCOCCQQ(Transform tr, List <ODODDQQO> arr, String[] DOODQOQO, String[] OODDQOQO)
    {
        version    = "2.5.6";
        OOOODDDODC = (GUISkin)Resources.Load("ER3DSkin", typeof(GUISkin));


        OOOCCQQQOC = (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;
        OODODOQQOD = new OQQDCCCQDQ();
        OQQOQOOOOO = obj.GetComponent <RoadObjectScript>();
        foreach (Transform child in obj)
        {
            if (child.name == "Markers")
            {
                OOODODOQDC = child;
            }
        }
        RoadObjectScript[] rscrpts = (RoadObjectScript[])FindObjectsOfType(typeof(RoadObjectScript));
        OQQDCCCQDQ.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;
            }
            OQQDCCCQDQ.OOCDCOQQCD(t);
        }
        OQOCOOCCQO.OOCDCOQQCD();
        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;
        }

        OODODOQQOD.OCOOQCDOOD(obj, OCOCCQOCDD, OQQOQOOOOO.roadWidth, surfaceOpacity, out OQQODCQODC, out indent, applyAnimation, waveSize, waveHeight);
        OODODOQQOD.ODCOOQCCCQ         = ODCOOQCCCQ;
        OODODOQQOD.OCQCQQOCCQ         = OCQCQQOCCQ;
        OODODOQQOD.OdQODQOD           = OdQODQOD + 1;
        OODODOQQOD.OOQQQDOD           = OOQQQDOD;
        OODODOQQOD.OOQQQDODOffset     = OOQQQDODOffset;
        OODODOQQOD.OOQQQDODLength     = OOQQQDODLength;
        OODODOQQOD.objectType         = objectType;
        OODODOQQOD.snapY              = snapY;
        OODODOQQOD.terrainRendered    = OCCDOQDQQD;
        OODODOQQOD.handleVegetation   = handleVegetation;
        OODODOQQOD.raise              = raise;
        OODODOQQOD.roadResolution     = roadResolution;
        OODODOQQOD.multipleTerrains   = multipleTerrains;
        OODODOQQOD.editRestore        = editRestore;
        OODODOQQOD.roadMaterialEdit   = roadMaterialEdit;
        OODODOQQOD.renderRoad         = renderRoad;
        OODODOQQOD.rscrpts            = rscrpts.Length;
        OODODOQQOD.blendFlag          = blendFlag;
        OODODOQQOD.startBlendDistance = startBlendDistance;
        OODODOQQOD.endBlendDistance   = endBlendDistance;
        if (backupLocation == 0)
        {
            OOCCCOCCCC.backupFolder = "/EasyRoads3D";
        }
        else
        {
            OOCCCOCCCC.backupFolder = OOCCCOCCCC.extensionPath + "/Backups";
        }

        ODODQOQO    = OODODOQQOD.OOCCQODDOD();
        ODODQOQOInt = OODODOQQOD.OCOCDOODOC();


        if (OCCDOQDQQD)
        {
            doRestore = true;
        }


        ODDOOCQODD();

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


        if (doRestore)
        {
            return;
        }
    }