기술 자료

Unity Engine

Unity Engine

RemoveAllEntries()

Removes every entry from this table.
읽는 시간 1분최근 업데이트: 한 달 전

Definition

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

Remarks

Clears only this locale's values. The shared keys in ResourceTable.SharedData and the entries of the other locale tables are untouched.
Clear all of a table's per-locale values.

Examples

using Unity.Localization;using UnityEngine;namespace Unity.Localization.Samples{ public class ResourceTableRemoveAllEntriesExample { public void Run() { var shared = ScriptableObject.CreateInstance<SharedTableData>(); var table = ScriptableObject.CreateInstance<ResourceTable>(); table.SharedData = shared; table.LocaleIdentifier = "en"; table.AddStringEntry("Greeting", "Hello"); table.AddStringEntry("Farewell", "Goodbye"); table.RemoveAllEntries(); Debug.Log(table.Entries.Count); // 0 } }}