Class MetaData
Class for sending various metadata to UnityAds.
Namespace: UnityEngine.Monetization
Syntax
public sealed class MetaData : Dictionary<string, object>, IDictionary<string, object>, ICollection<KeyValuePair<string, object>>, IEnumerable<KeyValuePair<string, object>>, IDictionary, ICollection, IEnumerable, ISerializable, IDeserializationCallback
Constructors
MetaData(String)
Constructs an metadata instance that can be passed to the Advertisement class.
Declaration
public MetaData(string category)
Parameters
| Type | Name | Description |
|---|---|---|
| String | category |
Properties
category
Metadata category.
Declaration
public string category { get; }
Property Value
| Type | Description |
|---|---|
| String |
Methods
Get(String)
Returns the stored metadata key.
Declaration
public object Get(string key)
Parameters
| Type | Name | Description |
|---|---|---|
| String | key |
Returns
| Type | Description |
|---|---|
| Object |
Set(String, Object)
Sets new metadata fields.
Declaration
public void Set(string key, object value)
Parameters
| Type | Name | Description |
|---|---|---|
| String | key | Metadata key. |
| Object | value | Metadata value. Must be JSON serializable. |