MetadataType
Identifies where a kind of metadata may be attached in a localized project.
Read time 1 minuteLast updated 12 days ago
Definition
- Type: Enum
- Namespace: Unity.Localization
- Assembly: UnityEngine.LocalizationRuntimeModule
[Flags]public enum MetadataType
Remarks
The value is a bit mask, so several targets can be combined. The editor reads it from MetadataAttribute to filter the "Add Metadata" menu, offering a metadata kind only on the targets it declares. The named targets correspond to a MetadataType.SharedTableData, a MetadataType.ResourceTable, a shared key, and a per-locale entry.
Additional Resources: MetadataAttribute, IMetadata, MetadataType.SharedTableData, MetadataType.ResourceTable
Test whether a value allows attaching metadata to a shared table entry.
Examples
using Unity.Localization;namespace Unity.Localization.Samples{ public class MetadataTypeExample { public bool Run(MetadataType allowed) => (allowed & MetadataType.SharedTableEntry) != 0; }}
Fields
Value | Description |
|---|---|
| All | Attachable to every target. |
| None | Not attachable anywhere. |
| ResourceEntry | Attachable to a per-locale entry. |
| ResourceTable | Attachable to a resource table, which holds the entries for one locale. |
| SharedTableData | Attachable to the shared table data, which covers the whole collection. |
| SharedTableEntry | Attachable to a shared key, which is common to all locales. |