GetCRCForAssetBundle(string, out uint)
Extract the CRC checksum for the given AssetBundle.
Read time 1 minuteLast updated 12 days ago
Definition
- Type: Method
- Namespace: UnityEditor
- Assembly: UnityEditor.CoreModule
GetCRCForAssetBundle(string, uint)
public static bool GetCRCForAssetBundle(string targetPath, out uint crc)
Parameters
Returns
Type | Description |
|---|---|
| bool | True if the method successfully reads the manifest file and extracts the CRC value. False if it cannot find the .manifest file associated to the |
Remarks
A 32-bit checksum is generated during the AssetBundle build process and recorded in the .manifest file and exposed by this method.
Additional Resources: CRC Checksums, AssetBundleManifest.GetAssetBundleHash
Examples
using UnityEngine;using UnityEditor;public class CheckAssetBundleCRCExample{ [MenuItem("Debug/Check AssetBundle CRC")] static public void CheckAssetBundleCRC() { string targetPath = EditorUtility.OpenFilePanel("Pick AssetBundle", "", ""); uint crc; if (targetPath.Length == 0 || !BuildPipeline.GetCRCForAssetBundle(targetPath, out crc)) return; Debug.Log($"AssetBundle {targetPath} has CRC equal to {crc}"); }}