Exemple #1
0
 private void OnEnable()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         if (instance != this)
         {
             Destroy(this);
         }
     }
     GaiaSettings gaiaSettings = GaiaUtils.GetGaiaSettings();
 }
Exemple #2
0
        public void Start()
        {
            if (instance == null)
            {
                instance = this;
            }
            else
            {
                if (instance != this)
                {
                    Destroy(this);
                }
            }

            //Nothing to do if no terrain loading
            if (!GaiaUtils.HasDynamicLoadedTerrains())
            {
                return;
            }

            LookUpLoadingScreen();

            //Process the runtime deactivation if the "Collider Only" mode is active
            if (TerrainSceneStorage.m_colliderOnlyLoading)
            {
                DeactivateIfRequested(m_terrainSceneStorage.m_deactivateRuntimePlayer, GaiaConstants.gaiaPlayerObject);
                DeactivateIfRequested(m_terrainSceneStorage.m_deactivateRuntimeLighting, GaiaConstants.gaiaLightingObject);
                DeactivateIfRequested(m_terrainSceneStorage.m_deactivateRuntimeAudio, GaiaConstants.gaiaAudioObject);
                DeactivateIfRequested(m_terrainSceneStorage.m_deactivateRuntimeWeather, GaiaConstants.gaiaWeatherObject);
                DeactivateIfRequested(m_terrainSceneStorage.m_deactivateRuntimeWater, GaiaConstants.gaiaWaterObject);
                DeactivateIfRequested(m_terrainSceneStorage.m_deactivateRuntimeScreenShotter, GaiaConstants.gaiaScreenshotter);
            }
            UnloadAll();
            m_runtimeInitialized = true;

#if GAIA_PRO_PRESENT
            if (m_loadingScreen != null)
            {
                m_loadingScreen.gameObject.SetActive(true);
            }

            StartTrackingProgress();
#endif
        }
Exemple #3
0
        public void OnEnable()
        {
            m_terrainLoaderManager = (TerrainLoaderManager)target;
            #if GAIA_PRO_PRESENT
            m_terrainLoaders = Resources.FindObjectsOfTypeAll <TerrainLoader>();
            #endif
            //m_placeHolders = Resources.FindObjectsOfTypeAll<GaiaTerrainPlaceHolder>();
            //m_placeHolders = m_placeHolders.OrderBy(x => x.name).ToArray();
            //foreach (GaiaTerrainPlaceHolder placeHolder in m_placeHolders)
            //{
            //    placeHolder.UpdateLoadState();
            //}

            //Init editor utils
            if (m_editorUtils == null)
            {
                // Get editor utils for this
                m_editorUtils = PWApp.GetEditorUtils(this);
            }

            m_terrainLoaderManager.LookUpLoadingScreen();
        }