# operator ==(AssetKey, AssetKey)

> Compares two keys for equality.

## Definition

* **Type:** Operator
* **Namespace:** [Unity.Localization.Providers](/engine/6000.7/script-reference/unity/localization/providers.md)
* **Assembly:** UnityEngine.LocalizationRuntimeModule

```csharp
public static bool operator ==(AssetKey a, AssetKey b)
```

### Parameters

**** (\[AssetKey]\(/engine/6000.7/script-reference/unity/localization/providers/assetkey)): The first key.**** (\[AssetKey]\(/engine/6000.7/script-reference/unity/localization/providers/assetkey)): The second key.

### Returns

| Type                                                          | Description                                                     |
| ------------------------------------------------------------- | --------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | `true` if the keys identify the same asset; otherwise, `false`. |

### Remarks

Equivalent to [AssetKey.Equals](/engine/6000.7/script-reference/unity/localization/providers/assetkey/equals.md): the keys match when their address, sub-asset name, and [AssetKey.Type](/engine/6000.7/script-reference/unity/localization/providers/assetkey/type.md) all match.

Compare two keys with the equality operator.

### Examples

```csharp
using Unity.Localization.Providers;
using UnityEngine;

namespace Unity.Localization.Samples
{
    public class AssetKeyEqualityOperatorExample
    {
        public void Run()
        {
            var a = new AssetKey("UI/Logo", typeof(Texture2D));
            var b = new AssetKey("UI/Logo", typeof(Texture2D));

            Debug.Log(a == b);   // True
        }
    }
}
```
