예제 #1
0
        static protected CachedInfo LoadCachedInfoForGUID(BuildCache cache, GUID guid)
        {
            IList <CachedInfo> infos;
            CacheEntry         entry1 = cache.GetCacheEntry(guid);

            cache.LoadCachedData(new List <CacheEntry>()
            {
                entry1
            }, out infos);
            return(infos[0]);
        }
예제 #2
0
        static CachedInfo LoadTargetCachedInfo(GUID guid, BuildTarget target)
        {
            var cache   = new BuildCache();
            var entries = new List <CacheEntry> {
                cache.GetCacheEntry(guid, AssetBundleBuildVersion)
            };

            cache.LoadCachedData(entries, out IList <CachedInfo> cachedInfos);
            if (cachedInfos[0] == null)
            {
                cachedInfos[0] = CalculateTargetCachedInfo(entries[0], target);
                // cache.SaveCachedData(cachedInfos); // TODO: Disabled because we have file contention as "Save" is async only with no wait functionality
            }
            return(cachedInfos[0]);
        }