Class HashGeneratorResult
Result produced by CodeHashGenerator. Contains resulting code hash or errors information.
public class HashGeneratorResult
- Inheritance
-
objectHashGeneratorResult
Properties
DurationSeconds
Hashing duration in seconds. Will be 0 if hashing was not succeed.
public double DurationSeconds { get; }
Property Value
- double
ErrorMessage
Error message you could find useful in case Success is not true.
public string ErrorMessage { get; }
Property Value
- string
FileHashes
Hashes for all files in currently running build.
public IReadOnlyList<FileHash> FileHashes { get; }
Property Value
- IReadOnlyList<FileHash>
Remarks
Feel free to compare it against hashes array you got in Editor to find if runtime version has new unknown hashes (this is an indication build was altered).
Success
True if generation was successful and resulting hashes are stored in FileHashes, otherwise check ErrorMessage to find out error cause.
public bool Success { get; }
Property Value
- bool
SummaryHash
Summary hash for all files in currently running build. May be null in case Success is not true.
public string SummaryHash { get; }
Property Value
- string
Remarks
Use with caution: summary hash for runtime build may differ from the summary hash you got in Editor, for example, for Android App Bundles. Use FileHashes for more accurate hashes comparison control.
Methods
HasFileHash(string)
Checks is passes hash exists in file hashes of this instance.
public bool HasFileHash(string hash)
Parameters
hashstringTarget file hash.
Returns
- bool
True if such hash presents at FileHashes and false otherwise.
PrintToConsole()
Prints found hashes to the console (if any).
public void PrintToConsole()