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

IMetadata

interface in Unity.Localization

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

Marks a type as metadata that can be attached to a locale, a table, a shared key, or a per-locale entry.

Implementations are serialized by reference through MetadataCollection, so each metadata item can carry its own serialized fields, for example a Comment or an ExcludeEntryFromEditorExport flag. Apply MetadataAttribute to an implementation to control where it can be attached and how it appears in the editor's "Add Metadata" menu.

Additional resources: MetadataCollection, MetadataAttribute, Comment, ExcludeEntryFromEditorExport

<para>Implement the interface to define a custom metadata item that carries its own fields.</para>

using System;
using Unity.Localization;

namespace Unity.Localization.Samples { [Serializable] public class IMetadataExample : IMetadata { public string author; } }