operator !=(AssetKey, AssetKey)
Compares two keys for inequality.
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
The negation of AssetKey.Equals: the keys differ when their address, sub-asset name, or AssetKey.Type differ.
Distinguish two keys that share an address but differ by type.
Examples
using Unity.Localization.Providers;using UnityEngine;namespace Unity.Localization.Samples{ public class AssetKeyInequalityOperatorExample { public void Run() { var texture = new AssetKey("UI/Logo", typeof(Texture2D)); var sprite = new AssetKey("UI/Logo", typeof(Sprite)); Debug.Log(texture != sprite); // True: same address, different type } }}