コード例 #1
0
ファイル: EasyRoadsEditorMenu.cs プロジェクト: KeriN0s/Arazi
 public static void  OQCOCDOCDD()
 {
     if (GetEasyRoads3DObjects())
     {
         OQCQQDCCCO.OQCOCDOCDD(Selection.activeGameObject);
     }
     else
     {
         EditorUtility.DisplayDialog("Alert", "No EasyRoads3D objects found! Terrain functions cannot be accessed!", "Close");
     }
 }
コード例 #2
0
ファイル: EasyRoadsEditorMenu.cs プロジェクト: KeriN0s/Arazi
 public static void  RestoreAllData()
 {
     if (GetEasyRoads3DObjects())
     {
         OCDOOCOODO.OCOOQQCDDO(Selection.activeGameObject);
         OQCQQDCCCO.OQCODQDQQO(true, 100, 4, "", Selection.activeGameObject);
         OCDOOCOODO.OQOQOQQOOD(Selection.activeGameObject);
     }
     else
     {
         EditorUtility.DisplayDialog("Alert", "No EasyRoads3D objects found! Terrain functions cannot be accessed!", "Close");
     }
 }
コード例 #3
0
ファイル: EasyRoadsEditorMenu.cs プロジェクト: KeriN0s/Arazi
 public static void  GetAllData()
 {
     if (GetEasyRoads3DObjects())
     {
         OCDOOCOODO.ODDOQCOOQC(Selection.activeGameObject);
         OQCQQDCCCO.OQCOCDOCDD(Selection.activeGameObject);
         OCDOOCOODO.OQCDCDOQQO(Selection.activeGameObject, null, "");
     }
     else
     {
         EditorUtility.DisplayDialog("Alert", "No EasyRoads3D objects found! Terrain functions cannot be accessed!", "Close");
     }
 }
コード例 #4
0
ファイル: EasyRoadsEditorMenu.cs プロジェクト: KeriN0s/Arazi
    public static void  OOQDODOCQC()
    {
        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");
            }


            OQCQQDCCCO.OQCODQDQQO(true, 100, 4, path, Selection.activeGameObject);
        }
        else
        {
            EditorUtility.DisplayDialog("Alert", "No EasyRoads3D objects found! Terrain functions cannot be accessed!", "Close");
        }
    }
コード例 #5
0
ファイル: RoadObjectScript.cs プロジェクト: KeriN0s/Arazi
    public void OCQOQOCQDC(Transform tr, List <ODODDQQO> arr, String[] DOODQOQO, String[] OODDQOQO)
    {
        version    = "2.5.9.3";
        OCDQQDOODQ = (GUISkin)Resources.Load("ER3DSkin", typeof(GUISkin));


        OCDCQCDOCC = (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;
        OOOOODODCQ = new OOQCOQOQQD();
        OQOCQODQCO = obj.GetComponent <RoadObjectScript>();
        foreach (Transform child in obj)
        {
            if (child.name == "Markers")
            {
                OCCOCOOOCC = child;
            }
        }
        RoadObjectScript[] rscrpts = (RoadObjectScript[])FindObjectsOfType(typeof(RoadObjectScript));
        OOQCOQOQQD.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;
            }
            OOOOODODCQ.OCDCQQCDDC(t);
        }
        OQCQQDCCCO.OCDCQQCDDC();
        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;
        }

        OOOOODODCQ.OOOODCDDQD(obj, ODCCQODQCO, OQOCQODQCO.roadWidth, surfaceOpacity, out OCDQCOOOOC, out indent, applyAnimation, waveSize, waveHeight);
        OOOOODODCQ.OODODDCCCQ         = OODODDCCCQ;
        OOOOODODCQ.OCQQCOCCCQ         = OCQQCOCCCQ;
        OOOOODODCQ.OdQODQOD           = OdQODQOD + 1;
        OOOOODODCQ.OOQQQDOD           = OOQQQDOD;
        OOOOODODCQ.OOQQQDODOffset     = OOQQQDODOffset;
        OOOOODODCQ.OOQQQDODLength     = OOQQQDODLength;
        OOOOODODCQ.objectType         = objectType;
        OOOOODODCQ.snapY              = snapY;
        OOOOODODCQ.terrainRendered    = OQCCDOOOCC;
        OOOOODODCQ.handleVegetation   = handleVegetation;
        OOOOODODCQ.raise              = raise;
        OOOOODODCQ.roadResolution     = roadResolution;
        OOOOODODCQ.multipleTerrains   = multipleTerrains;
        OOOOODODCQ.editRestore        = editRestore;
        OOOOODODCQ.roadMaterialEdit   = roadMaterialEdit;
        OOOOODODCQ.renderRoad         = renderRoad;
        OOOOODODCQ.rscrpts            = rscrpts.Length;
        OOOOODODCQ.blendFlag          = blendFlag;
        OOOOODODCQ.startBlendDistance = startBlendDistance;
        OOOOODODCQ.endBlendDistance   = endBlendDistance;

        OOOOODODCQ.iOS = iOS;

        if (backupLocation == 0)
        {
            ODQQDOOOOO.backupFolder = "/EasyRoads3D";
        }
        else
        {
            ODQQDOOOOO.backupFolder = ODQQDOOOOO.extensionPath + "/Backups";
        }

        ODODQOQO    = OOOOODODCQ.OCDCOOOOQC();
        ODODQOQOInt = OOOOODODCQ.OCQQCCDCDD();


        if (OQCCDOOOCC)
        {
            doRestore = true;
        }


        OQOQQQCDOQ();

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


        if (doRestore)
        {
            return;
        }
    }