docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method SetProperty

    SetProperty(string, Property)

    Set the property with the given key with the given value.

    Declaration
    public Property SetProperty(string key, Property value)
    Parameters
    Type Name Description
    string key

    Identifier of the property to get the value of.

    Property value

    The value to assign to the property.

    Returns
    Type Description
    Property

    The new value of the property.

    Exceptions
    Type Condition
    ArgumentException

    If the key parameter is null, empty, or whitespace.

    NullReferenceException

    If this item has been discarded.

    PropertyNotFoundException

    If there is no property with the given key in this item.

    PropertyInvalidCastException

    If the given value type is different from the expected type.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)