/// <inheritdoc />
        public Hash128 GetHash128(IBuildLogger log)
        {
#if UNITY_2019_3_OR_NEWER
            CacheEntry entry = BuildCacheUtility.GetCacheEntry(Scene);
#else
            CacheEntry entry = BuildCacheUtility.GetCacheEntry(ProcessedScene);
#endif
            HashSet <CacheEntry> hashObjects = new HashSet <CacheEntry>();
            using (log.ScopedStep(LogLevel.Verbose, $"Gather Objects", Command.fileName))
                Command.GatherSerializedObjectCacheEntries(hashObjects);

            List <Hash128> hashes = new List <Hash128>();
            using (log.ScopedStep(LogLevel.Verbose, $"Hashing Command", Command.fileName))
                hashes.Add(Command.GetHash128());
            using (log.ScopedStep(LogLevel.Verbose, $"Hashing UsageSet", Command.fileName))
                hashes.Add(UsageSet.GetHash128());
            using (log.ScopedStep(LogLevel.Verbose, $"Hashing ReferenceMap", Command.fileName))
                hashes.Add(ReferenceMap.GetHash128());
            using (log.ScopedStep(LogLevel.Verbose, $"Hashing PreloadInfo", Command.fileName))
                hashes.Add(PreloadInfo.GetHash128());
            using (log.ScopedStep(LogLevel.Verbose, $"Hashing Info", Command.fileName))
                hashes.Add(Info.GetHash128());
            using (log.ScopedStep(LogLevel.Verbose, $"Hashing Objects", Command.fileName))
                hashes.Add(HashingMethods.Calculate(hashObjects).ToHash128());
            hashes.Add(new Hash128(0, 0, 0, (uint)QualitySettingsApi.GetNumberOfLODsStripped()));
            hashes.Add(DependencyHash);

            return(HashingMethods.Calculate(hashes, Scene, entry).ToHash128());
        }
Esempio n. 2
0
        /// <inheritdoc />
        public Hash128 GetHash128(IBuildLogger log)
        {
            HashSet <CacheEntry> hashObjects = new HashSet <CacheEntry>();

            using (log.ScopedStep(LogLevel.Verbose, $"Gather Objects {GetType().Name}", Command.fileName))
            {
                if (Command.serializeObjects != null)
                {
                    foreach (var serializeObject in Command.serializeObjects)
                    {
                        hashObjects.Add(BuildCacheUtility.GetCacheEntry(serializeObject.serializationObject));
                    }
                }
            }

            List <Hash128> hashes = new List <Hash128>();

            using (log.ScopedStep(LogLevel.Verbose, $"Hashing Command", Command.fileName))
                hashes.Add(Command.GetHash128());
            using (log.ScopedStep(LogLevel.Verbose, $"Hashing UsageSet", Command.fileName))
                hashes.Add(UsageSet.GetHash128());
            using (log.ScopedStep(LogLevel.Verbose, $"Hashing ReferenceMap", Command.fileName))
                hashes.Add(ReferenceMap.GetHash128());
            using (log.ScopedStep(LogLevel.Verbose, $"Hashing Objects", Command.fileName))
                hashes.Add(HashingMethods.Calculate(hashObjects).ToHash128());
            hashes.Add(DependencyHash);

            return(HashingMethods.Calculate(hashes).ToHash128());
        }
        /// <inheritdoc />
        public Hash128 GetHash128()
        {
#if UNITY_2019_3_OR_NEWER
            return(HashingMethods.Calculate(Command, UsageSet.GetHash128(), ReferenceMap.GetHash128(), Scene, PreloadInfo).ToHash128());
#else
            var processedSceneHash = HashingMethods.CalculateFile(ProcessedScene).ToHash128();
            return(HashingMethods.Calculate(Command, UsageSet.GetHash128(), ReferenceMap.GetHash128(), Scene, processedSceneHash, PreloadInfo).ToHash128());
#endif
        }
Esempio n. 4
0
        /// <inheritdoc />
        public Hash128 GetHash128()
        {
#if UNITY_2019_3_OR_NEWER
            var prefabHashes = AssetDatabase.GetDependencies(Scene).Where(path => path.EndsWith(".prefab")).Select(AssetDatabase.GetAssetDependencyHash);
            return(HashingMethods.Calculate(Command, UsageSet.GetHash128(), ReferenceMap.GetHash128(), Scene, PreloadInfo, Info, prefabHashes).ToHash128());
#else
            var processedSceneHash = HashingMethods.CalculateFile(ProcessedScene).ToHash128();
            var prefabHashes       = AssetDatabase.GetDependencies(Scene).Where(path => path.EndsWith(".prefab")).Select(AssetDatabase.GetAssetDependencyHash);
            return(HashingMethods.Calculate(Command, UsageSet.GetHash128(), ReferenceMap.GetHash128(), Scene, processedSceneHash, PreloadInfo, Info, prefabHashes).ToHash128());
#endif
        }
Esempio n. 5
0
        /// <inheritdoc />
        public Hash128 GetHash128()
        {
            HashSet <CacheEntry> hashObjects = new HashSet <CacheEntry>();

            if (Command.serializeObjects != null)
            {
                foreach (var serializeObject in Command.serializeObjects)
                {
                    hashObjects.Add(BuildCacheUtility.GetCacheEntry(serializeObject.serializationObject));
                }
            }

            return(HashingMethods.Calculate(Command, UsageSet.GetHash128(), ReferenceMap.GetHash128(), Info, hashObjects).ToHash128());
        }
        /// <inheritdoc />
        public Hash128 GetHash128()
        {
            var prefabHashes = AssetDatabase.GetDependencies(Scene).Where(path => path.EndsWith(".prefab")).Select(AssetDatabase.GetAssetDependencyHash);

#if UNITY_2019_3_OR_NEWER
            CacheEntry entry = BuildCacheUtility.GetCacheEntry(Scene);
#else
            CacheEntry entry = BuildCacheUtility.GetCacheEntry(ProcessedScene);
#endif
            HashSet <CacheEntry> hashObjects = new HashSet <CacheEntry>();
            if (Command.serializeObjects != null)
            {
                foreach (var serializeObject in Command.serializeObjects)
                {
                    hashObjects.Add(BuildCacheUtility.GetCacheEntry(serializeObject.serializationObject));
                }
            }

            return(HashingMethods.Calculate(Command, UsageSet.GetHash128(), ReferenceMap.GetHash128(), Scene, PreloadInfo, prefabHashes, entry, hashObjects).ToHash128());
        }
Esempio n. 7
0
        /// <inheritdoc />
        public Hash128 GetHash128(IBuildLogger log)
        {
            HashSet <CacheEntry> hashObjects = new HashSet <CacheEntry>();

            using (log.ScopedStep(LogLevel.Verbose, $"Gather Objects {GetType().Name}", Command.fileName))
                Command.GatherSerializedObjectCacheEntries(hashObjects);

            List <Hash128> hashes = new List <Hash128>();

            using (log.ScopedStep(LogLevel.Verbose, $"Hashing Command", Command.fileName))
                hashes.Add(Command.GetHash128());
            using (log.ScopedStep(LogLevel.Verbose, $"Hashing UsageSet", Command.fileName))
                hashes.Add(UsageSet.GetHash128());
            using (log.ScopedStep(LogLevel.Verbose, $"Hashing ReferenceMap", Command.fileName))
                hashes.Add(ReferenceMap.GetHash128());
            using (log.ScopedStep(LogLevel.Verbose, $"Hashing Objects", Command.fileName))
                hashes.Add(HashingMethods.Calculate(hashObjects).ToHash128());
            hashes.Add(DependencyHash);

            return(HashingMethods.Calculate(hashes).ToHash128());
        }
Esempio n. 8
0
 /// <inheritdoc />
 public Hash128 GetHash128()
 {
     return(HashingMethods.Calculate(Command, UsageSet.GetHash128(), ReferenceMap.GetHash128(), Info).ToHash128());
 }
Esempio n. 9
0
        /// <inheritdoc />
        public Hash128 GetHash128()
        {
            Hash128 processedSceneHash = HashingMethods.CalculateFile(ProcessedScene).ToHash128();

            return(HashingMethods.Calculate(Command, UsageSet.GetHash128(), ReferenceMap.GetHash128(), Scene, processedSceneHash, PreloadInfo).ToHash128());
        }