기술 자료

Unity Engine

Unity Engine

IsSmart(long)

Returns whether a key is marked as a Smart String.
읽는 시간 1분최근 업데이트: 한 달 전

Definition

  • Type: Method
  • Namespace: Unity.Localization
  • Assembly: UnityEngine.LocalizationRuntimeModule
public bool IsSmart(long id)

Parameters

The stable key id.

Returns

Type

Description

bool
true
when the key's values are Smart Strings; otherwise,
false
.

Remarks

Equivalent to testing the SharedEntryFlags.Smart flag on the key's entry. Returns
false
when the id is absent.
Check whether a key uses Smart Strings.

Examples

using Unity.Localization;using UnityEngine;namespace Unity.Localization.Samples{ public class SharedTableDataIsSmartExample { public void Run() { var sharedData = ScriptableObject.CreateInstance<SharedTableData>(); var entry = sharedData.AddKey("GREETING"); entry.IsSmart = true; Debug.Log(sharedData.IsSmart(entry.Id)); // True } }}