Class MetaData
A class for sending various metadata to UnityAds.
Namespace: UnityEngine.Advertisements
Syntax
public sealed class MetaData
Constructors
MetaData(String)
Constructs a 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). |
Values()
Returns the stored metadata.
Declaration
public IDictionary<string, object> Values()
Returns
| Type | Description |
|---|---|
| IDictionary<String, Object> |