Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


PropertyPath

A PropertyPath is used to store a reference to a single property within a tree.
Read time 1 minuteLast updated 5 days ago

Definition

public readonly struct PropertyPath : IEquatable<PropertyPath>

Remarks

The path is stored as an array of parts and can be easily queried for algorithms.

Constructors

Constructor

Description

PropertyPath(System.String)Initializes a new instance of the PropertyPath based on the given property string.

Properties

Property

Description

IsEmptyGets if there is any part contained in the PropertyPath.
this[]Gets the PropertyPathPart at the given index.
LengthGets the number of parts contained in the PropertyPath.

Methods

Method

Description

EqualsIndicates whether this instance and a specified object are equal.

Static Methods

Method

Description

AppendIndexReturns a new PropertyPath combining the given PropertyPath and an index-type PropertyPathPart.
AppendKeyReturns a new PropertyPath combining the given PropertyPath and an key-type PropertyPathPart.
AppendNameReturns a new PropertyPath combining the given PropertyPath and an name-type PropertyPathPart.
AppendPartReturns a new PropertyPath combining the given PropertyPath and PropertyPathPart.
AppendPropertyReturns a new PropertyPath combining the given PropertyPath and a PropertyPathPart whose type will be based on the property interfaces.
CombineReturns a new PropertyPath combining the parts of the two given PropertyPath.
FromIndexReturns a new PropertyPath from the provided index.
FromKeyReturns a new PropertyPath from the provided key.
FromNameReturns a new PropertyPath from the provided name.
FromPartReturns a new PropertyPath from the provided PropertyPathPart.
PopReturns a new PropertyPath that will not include the last PropertyPathPart.
SubPathReturns a new PropertyPath containing the PropertyPathPart starting at the given start index.