ドキュメント

Unity Engine

Unity Engine

Clear()

Removes every key from the shared data.
読み終わるまでの所要時間 1 分最終更新 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 } }}