Esempio n. 1
0
    public void Load(TextAsset ta, Planet livePreview)
    {
        if (ta == null)
        {
            return;
        }
        savepath = AssetDatabase.GetAssetPath(ta);

        windows.Clear();
        settings = TerrainModule.LoadTextAsset(ta, true, 0, 1f);
        if (settings != null)
        {
            foreach (Node n in settings.nodes)
            {
                NodeWindow nw = new NodeWindow(n);

                if (n is OutputNode)
                {
                    nw.livePreview = livePreview;
                }

                windows.Add(nw);
            }
        }
    }
Esempio n. 2
0
 /// <summary>
 /// Loads settings from the file
 /// </summary>
 public void LoadModule()
 {
     terrain = TerrainModule.LoadTextAsset(terrainAsset, randomizeSeeds, seed, frequencyScale);
     if (terrain == null)
     {
         Debug.Log("TerrainModule file not found.");
         return;
     }
 }