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 public void OCQDOQQOQQ(RoadObjectScript target) { ODDQQCODQO.OCQCQDDQQD(target.transform); List <ODODDQQO> arr = ODDQQCODQO.OOQDQCCQDQ(false); target.OOQQQCODCQ(arr, ODDQQCODQO.ODQQOCCOQC(arr), ODDQQCODQO.OCQCOCOODD(arr)); Transform mySideObject = ODOCQDQQCO(target); OQDCCDCOCC(target.OOCQCQDOQO, target.transform, target.OQDCCCOCOD(), target.OOQDOOQQ, target.OOQQQOQO, target.raise, target, mySideObject); target.ODODDDOO = true; }
public static bool GetEasyRoads3DObjects() { RoadObjectScript[] scripts = (RoadObjectScript[])FindObjectsOfType(typeof(RoadObjectScript)); bool flag = false; foreach (RoadObjectScript script in scripts) { if (script.OOCQCQDOQO == null) { List <ODODDQQO> arr = ODDQQCODQO.OOQDQCCQDQ(false); script.OQOQCQOOOQ(script.transform, arr, ODDQQCODQO.ODQQOCCOQC(arr), ODDQQCODQO.OCQCOCOODD(arr)); } flag = true; } return(flag); }
static public void OQOQQDQOQQ(sideObjectScript scr, int index, RoadObjectScript target, Transform go) { string n = go.gameObject.name; Transform p = go.parent; if (go != null) { MonoBehaviour.DestroyImmediate(go.gameObject); } List <ODODDQQO> arr = ODDQQCODQO.OOQDQCCQDQ(false); ODODDQQO so = (ODODDQQO)arr[index]; OCOCDDQDQQ(n, p, so, index, target); 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.ODQDQQQCOD(target.OOCQCQDOQO, target.transform, target.OQDCCCOCOD(), target.OOQDOOQQ, index, target.raise, goi, ODOOCCODOC, ODDDDCOCDD); arr = null; }
public static void FinalizeRoads() { bool destroyTerrainScript = true; if (EditorUtility.DisplayDialog("Build EasyRoads3D Objects", "This process includes destroying all EasyRoads3D control objects. Did you make a backup of the Scene? Do you want to continue?\n\nDepending on the number of EasyRoads3D objects in the Scene and used side objects, this process may take a while. Please be patient. ", "Yes", "No")) { RoadObjectScript[] scripts = (RoadObjectScript[])FindObjectsOfType(typeof(RoadObjectScript)); foreach (RoadObjectScript script in scripts) { bool renderflag = true; bool renderAlreadyDone = false; int num = 0; if (!script.displayRoad) { num = EditorUtility.DisplayDialogComplex("Disabled EasyRoads3D Object Detected:", script.gameObject.name + " is currently not displayed.\n\nWould you like to activate and finalize this object, destroy this object or skip it in this finalize procedure?", "Finalize", "Destroy", "Skip"); if (num == 0) { script.displayRoad = true; if (script.OOCQCQDOQO == null) { List <ODODDQQO> arr = ODDQQCODQO.OOQDQCCQDQ(false); script.OCDCQQQCCQ(arr, ODDQQCODQO.ODQQOCCOQC(arr), ODDQQCODQO.OCQCOCOODD(arr)); } script.OOCQCQDOQO.OODQQOCCOO(script.displayRoad, script.OCCQODODOD); } if (num == 1) { renderflag = false; } if (num == 2) { renderflag = false; destroyTerrainScript = false; } } if (script.transform != null && renderflag && !script.ODQDCQQQDO) { if (script.OOCQCQDOQO == null) { List <ODODDQQO> arr = ODDQQCODQO.OOQDQCCQDQ(false); script.OCDCQQQCCQ(arr, ODDQQCODQO.ODQQOCCOQC(arr), ODDQQCODQO.OCQCOCOODD(arr)); } if (RoadObjectScript.erInit == "") { RoadObjectScript.erInit = OQCODCODQD.OOOQCDQCOQ(RoadObjectScript.version); ODDDQCOOOD.erInit = RoadObjectScript.erInit; } if (script.OOCQCQDOQO == null) { script.OQOQCQOOOQ(script.transform, null, null, null); } ODDDQCOOOD.OOODCDQDDC = true; if (!script.ODQDCQQQDO) { script.geoResolution = 0.5f; script.OOCDCCOCQD(); if (script.objectType < 2) { OCDOQOQQOC(script); } script.OOCQCQDOQO.terrainRendered = true; script.OOCOOQDQQD(); } if (script.displayRoad && script.objectType < 2) { if (script.objectType == 1) { SetWaterScript(script); } script.OOCQCQDOQO.road.transform.parent = null; script.OOCQCQDOQO.road.layer = 0; script.OOCQCQDOQO.road.name = script.gameObject.name; } else if (script.OOCQCQDOQO.road != null) { DestroyImmediate(script.OOCQCQDOQO.road); } bool flag = false; for (int i = 0; i < script.ODODQQOD.Length; i++) { if (script.ODODQQOD[i]) { flag = true; break; } } if (flag) { OOCCODOCQQ.OCQDOQQOQQ(script); } foreach (Transform child in script.transform) { if (child.name == "Side Objects") { child.name = script.gameObject.name + " - Side Objects "; child.parent = null; } } } else if (script.ODQDCQQQDO) { renderAlreadyDone = true; destroyTerrainScript = false; } if ((script.displayRoad || num != 2) && !renderAlreadyDone) { DestroyImmediate(script.gameObject); } } if (destroyTerrainScript) { EasyRoads3DTerrainID[] terrainscripts = (EasyRoads3DTerrainID[])FindObjectsOfType(typeof(EasyRoads3DTerrainID)); foreach (EasyRoads3DTerrainID script in terrainscripts) { DestroyImmediate(script); } } } }
public void OnGUI() { if (OOOQODCODO.extensionPath == "") { OOOQODCODO.extensionPath = GetExtensionPath(); } strArr = null; sosArr = null; returnType = 0; ODQDQQOODQ.ODQQDDOQDD(ref strVar, ref intVar, ref goVar, ref soVar, ref strArr, ref sosArr, ref returnType); if (returnType == 2) { ProceduralObjectsEditor editor = null; if (ProceduralObjectsEditor.instance == null) { editor = (ProceduralObjectsEditor)ScriptableObject.CreateInstance(typeof(ProceduralObjectsEditor)); } else { editor = ProceduralObjectsEditor.instance; } editor.position = new Rect(editor.position.x, editor.position.y, 500, 400); editor.title = strVar; ODODDQQO so = soVar; editor.DisplayNodes(intVar, so, goVar); editor.Show(); } else if (returnType == 4) { List <ODODDQQO> arr = ODDQQCODQO.OOQDQCCQDQ(false); RoadObjectScript.ODODOQQO = ODDQQCODQO.ODQQOCCOQC(arr); RoadObjectScript[] scripts = (RoadObjectScript[])FindObjectsOfType(typeof(RoadObjectScript)); foreach (RoadObjectScript scr in scripts) { scr.OOQQQCODCQ(arr, ODDQQCODQO.ODQQOCCOQC(arr), ODDQQCODQO.OCQCOCOODD(arr)); } if (ProceduralObjectsEditor.instance != null) { ProceduralObjectsEditor.instance.Close(); } instance.Close(); } else if (returnType == 1) { SideObjectImporter ieditor = (SideObjectImporter)ScriptableObject.CreateInstance(typeof(SideObjectImporter)); SideObjectImporter.sideobjects = strArr; SideObjectImporter.flags = new bool[intVar]; SideObjectImporter.importedSos = sosArr; ieditor.ShowUtility(); } else if (returnType == 3) { List <ODODDQQO> arr = ODDQQCODQO.OOQDQCCQDQ(false); RoadObjectScript.ODODOQQO = ODDQQCODQO.ODQQOCCOQC(arr); RoadObjectScript[] scripts = (RoadObjectScript[])FindObjectsOfType(typeof(RoadObjectScript)); foreach (RoadObjectScript scr in scripts) { List <ODODDQQO> arr1 = ODDQQCODQO.OOQDQCCQDQ(false); if (scr.OOCQCQDOQO == null) { scr.OCDCQQQCCQ(arr1, ODDQQCODQO.ODQQOCCOQC(arr1), ODDQQCODQO.OCQCOCOODD(arr1)); } scr.OOQQQCODCQ(arr1, ODDQQCODQO.ODQQOCCOQC(arr1), ODDQQCODQO.OCQCOCOODD(arr1)); if (scr.ODQDCQQQDO == true || scr.objectType == 2) { GameObject go = GameObject.Find(scr.gameObject.name + "/Side Objects/" + strVar); if (go != null) { OOCCODOCQQ.OQOQQDQOQQ((sideObjectScript)go.GetComponent(typeof(sideObjectScript)), intVar, scr, go.transform); } } } } }
void DoGUI() { EditorGUILayout.BeginHorizontal(); GUILayout.Space(60); if (GUILayout.Button("Apply", GUILayout.Width(65))) { OQDOOCCDDD.ODQOCCDDDD(); instance.Close(); } if (GUILayout.Button("Close", GUILayout.Width(65))) { instance.Close(); } EditorGUILayout.EndHorizontal(); GUILayout.Space(5); if (so_editor.isChanged == false) { GUI.enabled = false; } EditorGUILayout.BeginHorizontal(); GUILayout.Space(60); if (GUILayout.Button("Update Scene", GUILayout.Width(135))) { so.nodeList.Clear(); if (so_editor.closed) { so_editor.OODDDQCOCC.Add(so_editor.OODDDQCOCC[0]); } so.nodeList.AddRange(so_editor.OODDDQCOCC); so_editor.isChanged = false; ODQDQQOODQ.ODDQOOODQO(ODQDQQOODQ.selectedObject); ODQDQQOODQ.OQQOOQQCQD(); List <ODODDQQO> arr = ODDQQCODQO.OOQDQCCQDQ(false); RoadObjectScript.ODODOQQO = ODDQQCODQO.ODQQOCCOQC(arr); RoadObjectScript[] scripts = (RoadObjectScript[])FindObjectsOfType(typeof(RoadObjectScript)); foreach (RoadObjectScript scr in scripts) { if (scr.OOCQCQDOQO == null) { List <ODODDQQO> arr1 = ODDQQCODQO.OOQDQCCQDQ(false); scr.OCDCQQQCCQ(arr1, ODDQQCODQO.ODQQOCCOQC(arr1), ODDQQCODQO.OCQCOCOODD(arr1)); } scr.OOQQQCODCQ(arr, ODDQQCODQO.ODQQOCCOQC(arr), ODDQQCODQO.OCQCOCOODD(arr)); if (scr.ODQDCQQQDO == true || scr.objectType == 2) { GameObject go = GameObject.Find(scr.gameObject.name + "/Side Objects/" + so.name); if (go != null) { OOCCODOCQQ.OQOQQDQOQQ((sideObjectScript)go.GetComponent(typeof(sideObjectScript)), sideObject, scr, go.transform); } } } } EditorGUILayout.EndHorizontal(); GUI.enabled = true; if (GUI.changed) { so_editor.isChanged = true; } Handles.color = Color.black; Handles.DrawLine(new Vector2(stageSelectionGridWidth, 0), new Vector2(stageSelectionGridWidth, Screen.height)); Handles.DrawLine(new Vector2(stageSelectionGridWidth - 1, 0), new Vector2(stageSelectionGridWidth - 1, Screen.height)); }