diff --git a/Assets/YooAsset/Runtime/Utility/CRC32Algorithm.cs b/Assets/YooAsset/Runtime/Utility/CRC32Algorithm.cs index f8689c60..22a92b5f 100644 --- a/Assets/YooAsset/Runtime/Utility/CRC32Algorithm.cs +++ b/Assets/YooAsset/Runtime/Utility/CRC32Algorithm.cs @@ -76,13 +76,7 @@ namespace YooAsset /// /// Gets the computed hash value. /// - public uint CRCValue - { - get - { - return _currentCrc; - } - } + public uint CRCValue { private set; get; } /// /// Initializes a new instance of the class. @@ -115,6 +109,8 @@ namespace YooAsset /// protected override byte[] HashFinal() { + CRCValue = _currentCrc; + if (BitConverter.IsLittleEndian) return new[] { (byte)_currentCrc, (byte)(_currentCrc >> 8), (byte)(_currentCrc >> 16), (byte)(_currentCrc >> 24) }; else