ドキュメント

Unity Engine

Unity Engine

operator ==(AssetKey, AssetKey)

Compares two keys for equality.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

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

Parameters

The first key.

The second key.

Returns

Type

Description

bool
true
if the keys identify the same asset; otherwise,
false
.

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 } }}