Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


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

AllAttachable to every target.
NoneNot attachable anywhere.
ResourceEntryAttachable to a per-locale entry.
ResourceTableAttachable to a resource table, which holds the entries for one locale.
SharedTableDataAttachable to the shared table data, which covers the whole collection.
SharedTableEntryAttachable to a shared key, which is common to all locales.