Suggest a change
Success!
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
Close
Submission failed
For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.
Close
Declaration
public string ToString();
Returns
string
A human-readable description of the key.
Description
Returns a readable string describing this key.
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.
<para>Log a sub-asset key for debugging.</para>
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)
}
}
}