# GetCRCForAssetBundle(string, out uint)

> Extract the CRC checksum for the given AssetBundle.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.5/script-reference/unityeditor.md)
* **Assembly:** UnityEditor.CoreModule

## GetCRCForAssetBundle(string, uint)

```csharp
public static bool GetCRCForAssetBundle(string targetPath, out uint crc)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Asset bundle path.**** (\[uint]\(https\://learn.microsoft.com/dotnet/api/system.uint32)): A resulting checksum of the given asset bundle.

### Returns

| Type                                                          | Description                                                                                                                                                                                                                               |
| ------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | 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 `targetPath` or fails to parse the CRC value, which might happen due to incorrect paths. |

### 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](/engine/6000.5/manual/assets-and-media/assets-managing-runtime/assetbundles-section/asset-bundles-integrity.md), [AssetBundleManifest.GetAssetBundleHash](/engine/6000.5/script-reference/unityengine/assetbundlemanifest/getassetbundlehash.md)

### Examples

```csharp
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}");
    }
}
```
