public OptionConfigurationInitModule(ISessionCondition sessionState, IUnityAssetManager assetManager)
        {
            _assetManager = assetManager;
            var allMaps = SingletonManager.Get <MapsDescription>();

            if (allMaps.CurrentLevelType != LevelType.BigMap)
            {
                return;
            }
            SceneConfig               config         = allMaps.BigMapParameters;
            string                    preStr         = config.PreMapName;
            int                       gridNum        = config.TerrainDimension;
            StreamingLevelStructure   streamingLevel = SingletonManager.Get <StreamingLevelStructure>();
            ScenesLightmapStructure   lightmap       = SingletonManager.Get <ScenesLightmapStructure>();
            ScenesIndoorCullStructure indoor         = SingletonManager.Get <ScenesIndoorCullStructure>();

            streamingLevel.Clear();
            lightmap.Clear();
            indoor.Clear();
            for (int i = 0; i < gridNum; i++)
            {
                for (int j = 0; j < gridNum; j++)
                {
                    string preName = preStr + "_" + preStr + " " + i + "x" + j;
                    AddConfigSystem <StreamingLevelStructure>(sessionState, preName + StreamingConfig.DataXMLName, StreamingConfig.StreamingABPath + preStr + StreamingConfig.StreamingDataABName, streamingLevel);
                    AddConfigSystem <ScenesLightmapStructure>(sessionState, preName + StreamingConfig.LightXMLName, StreamingConfig.StreamingABPath + preStr + StreamingConfig.StreamingLightDataABName, lightmap);
                    AddConfigSystem <ScenesIndoorCullStructure>(sessionState, preName + StreamingConfig.InDoorXMLName, StreamingConfig.StreamingABPath + preStr + StreamingConfig.StreamingInDoorABName, indoor);
                }
            }

            _sessionState = sessionState;
        }
Example #2
0
        public void SetToWorldCompositionLevel(WorldCompositionParam param, IStreamingGoManager streamingGo)
        {
            _fixedSceneNames = param.FixedScenes;
            StreamingLevelStructure streamingLevel = SingletonManager.Get <StreamingLevelStructure>();
            ScenesLightmapStructure lightmap       = SingletonManager.Get <ScenesLightmapStructure>();

            lightmap.ListToDict();
            ScenesIndoorCullStructure indoor = SingletonManager.Get <ScenesIndoorCullStructure>();

            indoor.ListToDict();
            _sceneManager = new StreamingManager(this, streamingGo, streamingLevel.Data,
                                                 lightmap.Data, indoor.Data, param, _fixedSceneNames.Count);

            //RequestForFixedScenes(param.AssetBundleName);
            RequestForFixedScenes(param.PreMapName + "/scene");
        }