Example #1
0
        public static Scene CreateFromMap(IMapContainer map, string scenePath)
        {
            var entry = map.GetEntry(scenePath);

            if (entry == null)
            {
                LogManager.EditorLogger.LogError("[Scene] main.scene not found!");
                return(null);
            }
            using (Stream mapXmlStream = entry.OpenStream())
            {
                if (mapXmlStream == null)
                {
                    return(null);
                }
                return(DeserializeScene(mapXmlStream));
            }
        }