SetReference(TableReference, TableEntryReference)
Sets the table and entry references together so the reference refreshes only once.
阅读时间1 分钟最后更新于 1 个月前
Definition
- Type: Method
- Namespace: Unity.Localization
- Assembly: UnityEngine.LocalizationRuntimeModule
public void SetReference(TableReference table, TableEntryReference entry)
Parameters
The table collection to resolve the entry from.
The entry within the table collection to resolve.
Remarks
Prefer this over assigning LocalizedReference.TableReference and LocalizedEntry<TEntry>.TableEntryReference separately, because it applies both values with a single refresh of any live listeners.
Point a reference at an entry in one call.
Examples
using Unity.Localization;namespace Unity.Localization.Samples{ public class LocalizedEntrySetReferenceExample { public void SetReference() { var reference = new LocalizedString(); reference.SetReference("My Strings", "HELLO"); } }}