Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


ToString()

Returns a readable string describing this key.
Read time 1 minuteLast updated 12 days ago

Definition

public override string ToString()

Returns

Type

Description

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