Contains<T>()
Checks whether a metadata item of the given type is present.
Read time 1 minuteLast updated 13 days ago
Definition
- Type: Method
- Namespace: Unity.Localization
- Assembly: UnityEngine.LocalizationRuntimeModule
public bool Contains<T>() where T : class, IMetadata
Returns
Type | Description |
|---|---|
| bool | |
Remarks
Equivalent to testing whether MetadataCollection.GetMetadata returns a non-null value.
Check whether a collection already has a comment.
Examples
using Unity.Localization;namespace Unity.Localization.Samples{ public class MetadataCollectionContainsExample { public bool Run(MetadataCollection metadata) => metadata.Contains<Comment>(); }}