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

ExcludeEntryFromPlayerExport

class in Unity.Localization


Implements interfaces:IMetadata

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 key or entry so that it is left out of the files generated for a built player.

Use this to keep an entry out of the generated player file tables while still shipping it: the entry stays in the table asset and is served from there at runtime, the same way an object-reference asset entry is. It implements IMetadata, so it is stored in a MetadataCollection, and it carries no data of its own: its presence is the flag. The MetadataAttribute on this type allows it on shared keys and per-locale entries, and limits each target to a single instance.

Additional resources: ExcludeEntryFromEditorExport, IMetadata, MetadataCollection

<para>Flag an entry so the player file generation leaves it in the table asset.</para>

using Unity.Localization;

namespace Unity.Localization.Samples { public class ExcludeEntryFromExportExample { public void Run(MetadataCollection metadata) { // Keep the entry out of a built player's generated files, but still ship it in the table asset. metadata.AddMetadata(new ExcludeEntryFromPlayerExport());

// Keep the entry out of files exported for translators. metadata.AddMetadata(new ExcludeEntryFromEditorExport()); } } }