operator ==(AssetKey, AssetKey)
Compares two keys for equality.
Read time 1 minuteLast updated 13 days ago
Definition
- Type: Operator
- Namespace: Unity.Localization.Providers
- Assembly: UnityEngine.LocalizationRuntimeModule
public static bool operator ==(AssetKey a, AssetKey b)
Parameters
Returns
Type | Description |
|---|---|
| bool | |
Remarks
Equivalent to AssetKey.Equals: the keys match when their address, sub-asset name, and AssetKey.Type all match.
Compare two keys with the equality operator.
Examples
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 } }}