Struct SerializedObjectView | Serialization | 0.6.4-preview
docs.unity3d.com
    Show / Hide Table of Contents

    Struct SerializedObjectView

    A view on top of the PackedBinaryStream that represents a set of key-values.

    Namespace: Unity.Serialization
    Syntax
    public struct SerializedObjectView : ISerializedView, IEnumerable<SerializedMemberView>, IEnumerable

    Properties

    Item[String]

    Gets the value associated with the specified key.

    Declaration
    public SerializedValueView this[string name] { get; }
    Parameters
    Type Name Description
    String name

    The key of the value to get.

    Property Value
    Type Description
    SerializedValueView
    Exceptions
    Type Condition
    KeyNotFoundException

    The key does not exist in the collection.

    Methods

    GetEnumerator()

    Returns an enumerator that iterates through the SerializedObjectView.

    Declaration
    public SerializedObjectView.Enumerator GetEnumerator()
    Returns
    Type Description
    SerializedObjectView.Enumerator

    A SerializedObjectView.Enumerator for the SerializedObjectView.

    TryGetMember(String, out SerializedMemberView)

    Gets the member associated with the specified key.

    Declaration
    public bool TryGetMember(string name, out SerializedMemberView member)
    Parameters
    Type Name Description
    String name

    The key of the member to get.

    SerializedMemberView member

    When this method returns, contains the member associated with the specified key, if the key is found; otherwise, the default value.

    Returns
    Type Description
    Boolean

    true if the SerializedObjectView contains an element with the specified key; otherwise, false.

    TryGetValue(String, out SerializedValueView)

    Gets the value associated with the specified key.

    Declaration
    public bool TryGetValue(string name, out SerializedValueView value)
    Parameters
    Type Name Description
    String name

    The key of the value to get.

    SerializedValueView value

    When this method returns, contains the value associated with the specified key, if the key is found; otherwise, the default value.

    Returns
    Type Description
    Boolean

    true if the SerializedObjectView contains an element with the specified key; otherwise, false.

    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