Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


RemoveAllEntries()

Removes every entry from this table.
Read time 1 minuteLast updated 14 days ago

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