ドキュメント

Unity Engine

Unity Engine

RemoveKey(string)

Removes a key from the shared data.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

  • Type: Method
  • Namespace: Unity.Localization
  • Assembly: UnityEngine.LocalizationRuntimeModule
public void RemoveKey(string key)

Parameters

The key to remove.

Remarks

This removes the key from the shared key table only. The per-locale ResourceTable entries for the key are left untouched, so remove the key from the shared data and every locale table together to avoid orphaning translations. Does nothing when the key is absent.
Remove a single key from the shared data.

Examples

using Unity.Localization;using UnityEngine;namespace Unity.Localization.Samples{ public class SharedTableDataRemoveKeyExample { public void Run() { var sharedData = ScriptableObject.CreateInstance<SharedTableData>(); sharedData.AddKey("GREETING"); sharedData.RemoveKey("GREETING"); Debug.Log(sharedData.GetEntry("GREETING") == null); // True } }}