Class MetaData
A class for sending various metadata to UnityAds.
Inheritance
System.Object
MetaData
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 |
---|---|---|
System.String | category |
Properties
category
Metadata category.
Declaration
public string category { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
Get(String)
Returns the stored metadata key.
Declaration
public object Get(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key |
Returns
Type | Description |
---|---|
System.Object |
Set(String, Object)
Sets new metadata fields.
Declaration
public void Set(string key, object value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Metadata key. |
System.Object | value | Metadata value (must be JSON serializable). |
Values()
Returns the stored metadata.
Declaration
public IDictionary<string, object> Values()
Returns
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.String, System.Object> |