ToString()
Returns a readable string describing this key.
Read time 1 minuteLast updated 12 days ago
Definition
- Type: Method
- Namespace: Unity.Localization.Providers
- Assembly: UnityEngine.LocalizationRuntimeModule
public override string ToString()
Returns
Type | Description |
|---|---|
| string | A human-readable description of the key. |
Remarks
Formats the address, the sub-asset name in square brackets when present, and the type name in parentheses. An invalid key uses \<invalid\> in place of the address. Intended for debugging and logging.
Log a sub-asset key for debugging.
Examples
using Unity.Localization.Providers;using UnityEngine;namespace Unity.Localization.Samples{ public class AssetKeyToStringExample { public void Run() { var key = new AssetKey("UI/Atlas", typeof(Sprite), "Settings"); Debug.Log(key.ToString()); // UI/Atlas[Settings] (Sprite) } }}