Beispiel #1
0
    static private void OOQCOOQQDO(RoadObjectScript target)
    {
        EditorUtility.DisplayProgressBar("Build EasyRoads3D Object - " + target.gameObject.name, "Initializing", 0);

        RoadObjectScript[] scripts = (RoadObjectScript[])FindObjectsOfType(typeof(RoadObjectScript));
        List <Transform>   rObj    = new List <Transform>();


                #if UNITY_4_6
                #elif UNITY_4_5
                #elif UNITY_4_3
                #else
        Undo.RegisterUndo(ODQOOOQOQO.terrain.terrainData, "EasyRoads3D Terrain leveling");
                #endif


        foreach (RoadObjectScript script in scripts)
        {
            if (script.transform != target.transform)
            {
                rObj.Add(script.transform);
            }
        }
        if (target.ODODQOQO == null)
        {
            target.ODODQOQO    = target.OQCODQCQOC.ODDDCOQDCC();
            target.ODODQOQOInt = target.OQCODQCQOC.OCDDCDCCQD();
        }
        target.OQDODQOODQ(0.5f, true, false);

        List <tPoint>  hitOCOCCDOQQD = target.OQCODQCQOC.OQCCCOQCOO(Vector3.zero, target.raise, target.obj, target.OOQDOOQQ, rObj, target.handleVegetation);
        List <Vector3> changeArr     = new List <Vector3>();
        float          stepsf        = Mathf.Floor(hitOCOCCDOQQD.Count / 10);
        int            steps         = Mathf.RoundToInt(stepsf);
        for (int i = 0; i < 10; i++)
        {
            changeArr = target.OQCODQCQOC.OOCDDDQQQD(hitOCOCCDOQQD, i * steps, steps, changeArr);
            EditorUtility.DisplayProgressBar("Build EasyRoads3D Object - " + target.gameObject.name, "Updating Terrain", i * 10);
        }

        changeArr = target.OQCODQCQOC.OOCDDDQQQD(hitOCOCCDOQQD, 10 * steps, hitOCOCCDOQQD.Count - (10 * steps), changeArr);
        target.OQCODQCQOC.OQCQCCCOOQ(changeArr, rObj);

        target.OQCCOODCDO();
        EditorUtility.ClearProgressBar();
    }
    private static void OOQCOOQQDO(RoadObjectScript target)
    {
        EditorUtility.DisplayProgressBar("Build EasyRoads3D Object - " + target.gameObject.name,"Initializing", 0);

        RoadObjectScript[] scripts = (RoadObjectScript[])FindObjectsOfType(typeof(RoadObjectScript));
        List<Transform> rObj = new List<Transform>();

        #if UNITY_4_6
        #elif UNITY_4_5
        #elif UNITY_4_3
        #else
        Undo.RegisterUndo(OQCDOODQQQ.terrain.terrainData, "EasyRoads3D Terrain leveling");
        #endif
        foreach(RoadObjectScript script in scripts) {
        if(script.transform != target.transform) rObj.Add(script.transform);
        }
        if(target.ODODQOQO == null){
        target.ODODQOQO = target.OQCODQCQOC.ODDDCOQDCC();
        target.ODODQOQOInt = target.OQCODQCQOC.OCDDCDCCQD();
        }
        target.OQDODQOODQ(0.5f, true, false);

        List<tPoint> hitOCOCCDOQQD = target.OQCODQCQOC.OQCCCOQCOO(Vector3.zero, target.raise, target.obj, target.OOQDOOQQ, rObj, target.handleVegetation);
        List<Vector3> changeArr = new List<Vector3>();
        float stepsf = Mathf.Floor(hitOCOCCDOQQD.Count / 10);
        int steps = Mathf.RoundToInt(stepsf);
        for(int i = 0; i < 10;i++){
        changeArr = target.OQCODQCQOC.OOCDDDQQQD(hitOCOCCDOQQD, i * steps, steps, changeArr);
        EditorUtility.DisplayProgressBar("Build EasyRoads3D Object - " + target.gameObject.name,"Updating Terrain", i * 10);
        }

        changeArr = target.OQCODQCQOC.OOCDDDQQQD(hitOCOCCDOQQD, 10 * steps, hitOCOCCDOQQD.Count - (10 * steps), changeArr);
        target.OQCODQCQOC.OQCQCCCOOQ(changeArr, rObj);

        target.OQCCOODCDO();
        EditorUtility.ClearProgressBar();
    }