Пример #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);
                }
            }
        }
Пример #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;
     }
 }
Пример #3
0
        /// <summary>
        /// Keeps connections to planet
        /// </summary>
        void OnEnable()
        {
            if (planet == null)
            {
                planet = GetComponent <Planet>();
            }

            if (planet != null)
            {
                planet.SurfaceGenerated += OnSurfaceGenerated;
            }

            terrainModule = TerrainModule.LoadTextAsset(foliageModule, false, 0f, 1f);

            GenerateImpostors();
        }