| Parameter | Description |
|---|---|
| keyId | The stable key id of the entry to remove. |
Removes the entry for a stable key id from this table.
Removes only this locale's value. The key stays in ResourceTable.SharedData and the other locale tables keep
their entries. Does nothing when no entry matches the id. To drop the key from the whole collection, call
SharedTableData.RemoveKey as well.
Additional resources: ResourceTable.RemoveAllEntries, ResourceTable.AddEntry, SharedTableData
<para>Remove a single entry and confirm it is gone.</para>
using Unity.Localization; using UnityEngine;
namespace Unity.Localization.Samples { public class ResourceTableRemoveEntryExample { public void Run() { var shared = ScriptableObject.CreateInstance<SharedTableData>(); var table = ScriptableObject.CreateInstance<ResourceTable>(); table.SharedData = shared; table.LocaleIdentifier = "en";
var entry = table.AddStringEntry("Greeting", "Hello"); table.RemoveEntry(entry.KeyId);
Debug.Log(table.GetEntry(entry.KeyId) == null); // True } } }