예제 #1
0
//----------------------------------------------------------------------------------------------------------------------

        private bool OpenCacheInternal(string path, bool updateNonMaterialAssets)
        {
            CloseCache();

            m_sceneCache = SceneCacheData.Open(path);
            if (!m_sceneCache)
            {
                Debug.LogError($"SceneCachePlayer: cache open failed ({path})");
                return(false);
            }

            m_sceneCacheFilePath = path;

            UpdateSceneCacheInfo(m_sceneCacheInfo, m_sceneCache);

#if UNITY_EDITOR
            SetSortEntities(true);
#endif
            LogDebug($"SceneCachePlayer: cache opened ({path})");

            //[Note-sin: 2021-7-19] Time/Frame 0 must be loaded first, because the data of other frames might contain "No change from frame 0"
            LoadSceneCacheToScene(0, updateNonMaterialAssets);

            return(true);
        }
예제 #2
0
        public bool OpenCache(string path)
        {
            CloseCache();
            m_openRequested = false;

            m_sceneCache = SceneCacheData.Open(path);
            if (m_sceneCache)
            {
#if UNITY_EDITOR
                this.sortEntities = true;
#endif
                m_cacheFilePath.fullPath = path;
                m_pathPrev  = path;
                m_timeRange = m_sceneCache.timeRange;
                if (m_logging)
                {
                    Debug.Log(string.Format("SceneCachePlayer: cache opened ({0})", path));
                }
                return(true);
            }
            else
            {
                if (m_logging)
                {
                    Debug.Log(string.Format("SceneCachePlayer: cache open failed ({0})", path));
                }
                return(false);
            }
        }
예제 #3
0
        internal ISceneCacheInfo ExtractSceneCacheInfo(bool forceOpen)
        {
            if (IsSceneCacheOpened())
            {
                return(m_sceneCacheInfo);
            }

            if (!forceOpen)
            {
                return(null);
            }

            SceneCacheData tempSceneCache = SceneCacheData.Open(m_sceneCacheFilePath);

            if (!tempSceneCache)
            {
                return(null);
            }

            SceneCacheInfo ret = new SceneCacheInfo();

            UpdateSceneCacheInfo(ret, tempSceneCache);
            tempSceneCache.Close();

            return(ret);
        }
예제 #4
0
        private bool OpenCacheInternal(string path)
        {
            CloseCache();

            m_sceneCache = SceneCacheData.Open(path);
            if (!m_sceneCache)
            {
                Log($"SceneCachePlayer: cache open failed ({path})", LogType.ERROR);
                return(false);
            }

#if UNITY_EDITOR
            SetSortEntities(true);
#endif
            Log($"SceneCachePlayer: cache opened ({path})", LogType.DEBUG);
            return(true);
        }