기술 자료

Unity Engine

Unity Engine

Clear()

Removes every key from the shared data.
읽는 시간 1분최근 업데이트: 한 달 전

Definition

  • Type: Method
  • Namespace: Unity.Localization
  • Assembly: UnityEngine.LocalizationRuntimeModule
public void Clear()

Remarks

This clears the shared key table only. The entries in each per-locale ResourceTable are left untouched, so clear the shared data and every locale table together to avoid orphaning translations.
Remove all keys from the shared data.

Examples

using Unity.Localization;using UnityEngine;namespace Unity.Localization.Samples{ public class SharedTableDataClearExample { public void Run() { var sharedData = ScriptableObject.CreateInstance<SharedTableData>(); sharedData.AddKey("GREETING"); sharedData.AddKey("FAREWELL"); sharedData.Clear(); Debug.Log(sharedData.Entries.Count); // 0 } }}