Version: Unity 6.7 Alpha (6000.7)
LanguageEnglish
  • C#

MetadataType

enumeration

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Identifies where a kind of metadata may be attached in a localized project.

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

<para>Test whether a value allows attaching metadata to a shared table entry.</para>

using Unity.Localization;

namespace Unity.Localization.Samples { public class MetadataTypeExample { public bool Run(MetadataType allowed) => (allowed & MetadataType.SharedTableEntry) != 0; } }

Properties

Property Description
None Not attachable anywhere.
SharedTableData Attachable to the shared table data, which covers the whole collection.
ResourceTable Attachable to a resource table, which holds the entries for one locale.
SharedTableEntry Attachable to a shared key, which is common to all locales.
ResourceEntry Attachable to a per-locale entry.
All Attachable to every target.