Class MetaData | Package Manager UI website
docs.unity.cn
    Show / Hide Table of Contents

    Class MetaData

    Class for sending various metadata to UnityAds.

    Inheritance
    System.Object
    System.Collections.Generic.Dictionary<System.String, System.Object>
    MetaData
    Namespace: UnityEngine.Monetization
    Syntax
    public sealed class MetaData : Dictionary<string, object>, IDictionary<string, object>, ICollection<KeyValuePair<string, object>>, IDictionary, ICollection, IReadOnlyDictionary<string, object>, IReadOnlyCollection<KeyValuePair<string, object>>, IEnumerable<KeyValuePair<string, object>>, 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
    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.

    Back to top Copyright © 2019 Unity Technologies
    Generated by DocFX