Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


IsSmart(long)

Returns whether a key is marked as a Smart String.
Read time 1 minuteLast updated 12 days ago

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