docs.unity3d.com
    Show / Hide Table of Contents

    Struct PropertyPath.Part

    A PropertyPath.Part represents a single element of the path.

    Namespace: Unity.Properties
    Syntax
    public struct Part : IEquatable<PropertyPath.Part>
    Remarks

    Name -> ".{name}" Index -> "[{index}]" Key -> "[{key}]"

    Constructors

    Part(Int32)

    Initializes a new PropertyPath.Part with the specified index.

    Declaration
    public Part(int index)
    Parameters
    Type Name Description
    Int32 index

    The index of the part.

    Part(Object)

    Initializes a new PropertyPath.Part with the specified key.

    Declaration
    public Part(object key)
    Parameters
    Type Name Description
    Object key

    The key of the part.

    Part(String)

    Initializes a new PropertyPath.Part with the specified name.

    Declaration
    public Part(string name)
    Parameters
    Type Name Description
    String name

    The name of the part.

    Properties

    Index

    The Index of the part. This will only be set when using Index

    Declaration
    public readonly int Index { get; }
    Property Value
    Type Description
    Int32

    IsIndex

    Returns true if the part is Index.

    Declaration
    public readonly bool IsIndex { get; }
    Property Value
    Type Description
    Boolean

    IsKey

    Returns true if the part is Key.

    Declaration
    public readonly bool IsKey { get; }
    Property Value
    Type Description
    Boolean

    IsName

    Returns true if the part is Name.

    Declaration
    public readonly bool IsName { get; }
    Property Value
    Type Description
    Boolean

    Key

    The Key of the part. This will only be set when using Key

    Declaration
    public readonly object Key { get; }
    Property Value
    Type Description
    Object

    Name

    The Name of the part. This will only be set when using Name

    Declaration
    public readonly string Name { get; }
    Property Value
    Type Description
    String

    Type

    The PropertyPath.PartType for this path. This determines how algorithms will resolve the path.

    Declaration
    public readonly PropertyPath.PartType Type { get; }
    Property Value
    Type Description
    PropertyPath.PartType

    Methods

    Equals(Object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj
    Returns
    Type Description
    Boolean

    Equals(PropertyPath.Part)

    Declaration
    public bool Equals(PropertyPath.Part other)
    Parameters
    Type Name Description
    PropertyPath.Part other
    Returns
    Type Description
    Boolean

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    String
    Back to top
    Terms of use
    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