Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


GetMetadatas<T>()

Enumerates every metadata item of the given type.
Read time 1 minuteLast updated 13 days ago

Definition

  • Type: Method
  • Namespace: Unity.Localization
  • Assembly: UnityEngine.LocalizationRuntimeModule
public IEnumerable<T> GetMetadatas<T>() where T : class, IMetadata

Returns

Type

Description

IEnumerable<T>A sequence of the items assignable to
T
.

Remarks

Items are returned in the order they were added. Use MetadataCollection.GetMetadata when you only need the first match.
Iterate every comment attached to a collection.

Examples

using System.Collections.Generic;using Unity.Localization;namespace Unity.Localization.Samples{ public class MetadataCollectionGetMetadatasExample { public IEnumerable<Comment> Run(MetadataCollection metadata) => metadata.GetMetadatas<Comment>(); }}