public static void Show(Action <Ferr2DT_TerrainMaterial> aOnPickMaterial)
    {
        Ferr2DT_MaterialSelector wiz = ScriptableWizard.DisplayWizard <Ferr2DT_MaterialSelector>("Select Terrain Material");

        wiz.materials      = new List <Ferr2DT_TerrainMaterial>();
        wiz.onPickMaterial = aOnPickMaterial;
        wiz.materials      = Ferr_ComponentTracker.GetComponents <Ferr2DT_TerrainMaterial>();
    }
Beispiel #2
0
    public static void SaveTerrains()
    {
        System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch();
        sw.Start();

        List <Ferr2DT_PathTerrain> terrains = Ferr_ComponentTracker.GetComponents <Ferr2DT_PathTerrain>(); //Ferr2DT_AssetTracker.GetPrefabs();

        for (int i = 0; i < terrains.Count; i++)
        {
            terrains[i].RecreatePath(true);;
        }

        sw.Stop();
        if (terrains.Count > 0 && sw.Elapsed.TotalMilliseconds > 500)
        {
            Debug.Log("Prebuilding terrain prefabs (" + terrains.Count + "): " + Mathf.Round((float)sw.Elapsed.TotalMilliseconds) + "ms");
        }
    }