static public void OQDCCDCOCC(ODDDQCOOOD OOCQCQDOQO, Transform obj, List <SideObjectParams> param, bool OOQDOOQQ, int[] activeODODDQQO, float raise, RoadObjectScript target, Transform mySideObject) { List <ODQOQCDQQC> pnts = target.OOCQCQDOQO.OQDQCDDCOC; List <ODODDQQO> arr = ODDQQCODQO.OOQDQCCQDQ(false); for (int i = 0; i < activeODODDQQO.Length; i++) { ODODDQQO so = (ODODDQQO)arr[activeODODDQQO[i]]; GameObject goi = null; if (so.ODOQQCQDOO != "") { goi = (GameObject)AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(so.ODOQQCQDOO), typeof(GameObject)); } GameObject ODOOCCODOC = null; if (so.ODCDOOQDDD != "") { ODOOCCODOC = (GameObject)AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(so.ODCDOOQDDD), typeof(GameObject)); } GameObject ODDDDCOCDD = null; if (so.ODCCOCQQOD != "") { ODDDDCOCDD = (GameObject)AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(so.ODCCOCQQOD), typeof(GameObject)); } ODDQQCODQO.OODQQCDDDD(so, pnts, obj, OOCQCQDOQO, param, OOQDOOQQ, activeODODDQQO[i], raise, goi, ODOOCCODOC, ODDDDCOCDD); if (so.terrainTree > 0) { if (EditorUtility.DisplayDialog("Side Objects", "Side Object " + so.name + " in " + target.gameObject.name + " includes an asset part of the terrain vegetation data.\n\nWould you like to add this side object to the terrain vegetation data?", "yes", "no")) { foreach (Transform child in mySideObject) { if (child.gameObject.name == so.name) { ODDQQCODQO.OOQOQODDQO(activeODODDQQO[i], child); MonoBehaviour.DestroyImmediate(child.gameObject); break; } } } } foreach (Transform child in mySideObject) { if (child.gameObject.GetComponent(typeof(sideObjectScript)) != null) { MonoBehaviour.DestroyImmediate(child.gameObject.GetComponent(typeof(sideObjectScript))); } } } }
static void ShowObjectManager() { if (RoadObjectScript.erInit == "") { RoadObjectScript[] scripts = (RoadObjectScript[])FindObjectsOfType(typeof(RoadObjectScript)); if (scripts != null) { if (scripts.Length != 0) { Selection.activeGameObject = scripts[0].gameObject; } } } if (ObjectManager.instance == null) { if (Terrain.activeTerrain != null) { ODQDQQOODQ.terrainTrees = ODDDQCOOOD.OCODDDOCCO(); } ObjectManager window = (ObjectManager)ScriptableObject.CreateInstance(typeof(ObjectManager)); window.ShowUtility(); } }
public void OQOQCQOOOQ(Transform tr, List <ODODDQQO> arr, String[] DOODQOQO, String[] OODDQOQO) { version = "2.5.5.1"; OCDCDOQDOC = (GUISkin)Resources.Load("ER3DSkin", typeof(GUISkin)); OQQCQOOQCQ = (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; OOCQCQDOQO = new ODDDQCOOOD(); OQQCCDODCO = obj.GetComponent <RoadObjectScript>(); foreach (Transform child in obj) { if (child.name == "Markers") { OCCQODODOD = child; } } RoadObjectScript[] rscrpts = (RoadObjectScript[])FindObjectsOfType(typeof(RoadObjectScript)); ODDDQCOOOD.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; } OOCQCQDOQO.OOQODOODCC(t); } ODQOOOQOQO.OOQODOODCC(); 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; } OOCQCQDOQO.OOOCDOOQQD(obj, OODCQDQQQC, OQQCCDODCO.roadWidth, surfaceOpacity, out OCOCQCQODD, out indent, applyAnimation, waveSize, waveHeight); OOCQCQDOQO.OCQOQOOOCD = OCQOQOOOCD; OOCQCQDOQO.OQDODQCOQQ = OQDODQCOQQ; OOCQCQDOQO.OdQODQOD = OdQODQOD + 1; OOCQCQDOQO.OOQQQDOD = OOQQQDOD; OOCQCQDOQO.OOQQQDODOffset = OOQQQDODOffset; OOCQCQDOQO.OOQQQDODLength = OOQQQDODLength; OOCQCQDOQO.objectType = objectType; OOCQCQDOQO.snapY = snapY; OOCQCQDOQO.terrainRendered = ODQDCQQQDO; OOCQCQDOQO.handleVegetation = handleVegetation; OOCQCQDOQO.raise = raise; OOCQCQDOQO.roadResolution = roadResolution; OOCQCQDOQO.multipleTerrains = multipleTerrains; OOCQCQDOQO.editRestore = editRestore; OOCQCQDOQO.roadMaterialEdit = roadMaterialEdit; OOCQCQDOQO.renderRoad = renderRoad; OOCQCQDOQO.rscrpts = rscrpts.Length; OOCQCQDOQO.blendFlag = blendFlag; OOCQCQDOQO.startBlendDistance = startBlendDistance; OOCQCQDOQO.endBlendDistance = endBlendDistance; OOCQCQDOQO.iOS = iOS; if (backupLocation == 0) { OOOQODCODO.backupFolder = "/EasyRoads3D"; } else { OOOQODCODO.backupFolder = OOOQODCODO.extensionPath + "/Backups"; } ODODQOQO = OOCQCQDOQO.OCQDDDDCDO(); ODODQOQOInt = OOCQCQDOQO.OCODQCOODQ(); if (ODQDCQQQDO) { doRestore = true; } OOCDCCOCQD(); if (arr != null || ODODQOOQ == null) { OOQQQCODCQ(arr, DOODQOQO, OODDQOQO); } if (doRestore) { return; } }
public static void OQDCCDCOCC(ODDDQCOOOD OOCQCQDOQO, Transform obj , List<SideObjectParams> param , bool OOQDOOQQ , int[] activeODODDQQO , float raise, RoadObjectScript target , Transform mySideObject) { List<ODQOQCDQQC> pnts = target.OOCQCQDOQO.OQDQCDDCOC; List<ODODDQQO> arr = ODDQQCODQO.OOQDQCCQDQ(false); for(int i = 0; i < activeODODDQQO.Length; i++){ ODODDQQO so = (ODODDQQO)arr[activeODODDQQO[i]]; GameObject goi = null; if(so.ODOQQCQDOO != "") goi = (GameObject)AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(so.ODOQQCQDOO), typeof(GameObject)); GameObject ODOOCCODOC = null; if(so.ODCDOOQDDD != "") ODOOCCODOC = (GameObject)AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(so.ODCDOOQDDD), typeof(GameObject)); GameObject ODDDDCOCDD = null; if(so.ODCCOCQQOD != "") ODDDDCOCDD = (GameObject)AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(so.ODCCOCQQOD), typeof(GameObject)); ODDQQCODQO.OODQQCDDDD(so, pnts, obj, OOCQCQDOQO, param, OOQDOOQQ, activeODODDQQO[i], raise, goi, ODOOCCODOC, ODDDDCOCDD); if(so.terrainTree > 0){ if(EditorUtility.DisplayDialog("Side Objects", "Side Object " + so.name + " in " + target.gameObject.name + " includes an asset part of the terrain vegetation data.\n\nWould you like to add this side object to the terrain vegetation data?", "yes","no")){ foreach(Transform child in mySideObject){ if(child.gameObject.name == so.name){ ODDQQCODQO.OOQOQODDQO(activeODODDQQO[i], child); MonoBehaviour.DestroyImmediate(child.gameObject); break; } } } } foreach(Transform child in mySideObject)if(child.gameObject.GetComponent(typeof(sideObjectScript)) != null) MonoBehaviour.DestroyImmediate(child.gameObject.GetComponent(typeof(sideObjectScript))); } }
public void OQOQCQOOOQ(Transform tr, List<ODODDQQO> arr, String[] DOODQOQO, String[] OODDQOQO) { version = "2.5.6"; OCDCDOQDOC = (GUISkin)Resources.Load("ER3DSkin", typeof(GUISkin)); OQQCQOOQCQ = (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; OOCQCQDOQO = new ODDDQCOOOD(); OQQCCDODCO = obj.GetComponent<RoadObjectScript>(); foreach(Transform child in obj){ if(child.name == "Markers") OCCQODODOD = child; } RoadObjectScript[] rscrpts = (RoadObjectScript[])FindObjectsOfType(typeof(RoadObjectScript)); ODDDQCOOOD.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; } OOCQCQDOQO.OOQODOODCC(t); } ODQOOOQOQO.OOQODOODCC(); 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; } OOCQCQDOQO.OOOCDOOQQD(obj, OODCQDQQQC, OQQCCDODCO.roadWidth, surfaceOpacity, out OCOCQCQODD, out indent, applyAnimation, waveSize, waveHeight); OOCQCQDOQO.OCQOQOOOCD = OCQOQOOOCD; OOCQCQDOQO.OQDODQCOQQ = OQDODQCOQQ; OOCQCQDOQO.OdQODQOD = OdQODQOD + 1; OOCQCQDOQO.OOQQQDOD = OOQQQDOD; OOCQCQDOQO.OOQQQDODOffset = OOQQQDODOffset; OOCQCQDOQO.OOQQQDODLength = OOQQQDODLength; OOCQCQDOQO.objectType = objectType; OOCQCQDOQO.snapY = snapY; OOCQCQDOQO.terrainRendered = ODQDCQQQDO; OOCQCQDOQO.handleVegetation = handleVegetation; OOCQCQDOQO.raise = raise; OOCQCQDOQO.roadResolution = roadResolution; OOCQCQDOQO.multipleTerrains = multipleTerrains; OOCQCQDOQO.editRestore = editRestore; OOCQCQDOQO.roadMaterialEdit = roadMaterialEdit; OOCQCQDOQO.renderRoad = renderRoad; OOCQCQDOQO.rscrpts = rscrpts.Length; OOCQCQDOQO.blendFlag = blendFlag; OOCQCQDOQO.startBlendDistance = startBlendDistance; OOCQCQDOQO.endBlendDistance = endBlendDistance; OOCQCQDOQO.iOS = iOS; if(backupLocation == 0)OOOQODCODO.backupFolder = "/EasyRoads3D"; else OOOQODCODO.backupFolder = OOOQODCODO.extensionPath + "/Backups"; ODODQOQO = OOCQCQDOQO.OCQDDDDCDO(); ODODQOQOInt = OOCQCQDOQO.OCODQCOODQ(); if(ODQDCQQQDO){ doRestore = true; } OOCDCCOCQD(); if(arr != null || ODODQOOQ == null) OOQQQCODCQ(arr, DOODQOQO, OODDQOQO); if(doRestore) return; }