Class MetaData | Advertisement | 3.3.1
docs.unity3d.com
    Show / Hide Table of Contents

    Class MetaData

    Class for sending various metadata to UnityAds.

    Inheritance
    Object
    Dictionary<String, 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
    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.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023