文档

Unity Engine

Unity Engine

ToString()

Returns the culture code for this identifier.
阅读时间1 分钟最后更新于 1 个月前

Definition

  • Type: Method
  • Namespace: Unity.Localization
  • Assembly: UnityEngine.LocalizationRuntimeModule
public override string ToString()

Returns

Type

Description

stringThe culture code, or the empty string when the identifier is undefined.

Remarks

Returns the empty string for the undefined locale. Equivalent to reading LocaleIdentifier.Code.
Log the identifier's culture code.

Examples

using Unity.Localization;using UnityEngine;namespace Unity.Localization.Samples{ public class LocaleIdentifierToStringExample { public void Run(LocaleIdentifier identifier) { Debug.Log(identifier.ToString()); } }}