T
The first item assignable to T, or null when none is present.
Returns the first metadata item of the given type.
Use MetadataCollection.GetMetadatas when a target can hold more than one item of the same type.
<para>Read the first comment attached to a collection.</para>
using Unity.Localization;
namespace Unity.Localization.Samples { public class MetadataCollectionGetMetadataExample { public string Run(MetadataCollection metadata) { var comment = metadata.GetMetadata<Comment>(); return comment?.CommentText; } } }