# PropertyPath

> A PropertyPath is used to store a reference to a single property within a tree.

## Definition

* **Type:** Struct
* **Namespace:** [Unity.Properties](/engine/6000.0/script-reference/unity/properties.md)
* **Assembly:** UnityEngine.PropertiesModule
* **Implements:** [IEquatable\<PropertyPath>](https://learn.microsoft.com/dotnet/api/system.iequatable-1)

```csharp
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)](/engine/6000.0/script-reference/unity/properties/propertypath/ctor.md) | Initializes a new instance of the [PropertyPath](/engine/6000.0/script-reference/unity/properties/propertypath.md) based on the given property string. |

## Properties

| Property                                                                            | Description                                                                                                                  |
| ----------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| [IsEmpty](/engine/6000.0/script-reference/unity/properties/propertypath/isempty.md) | Gets if there is any part contained in the [PropertyPath](/engine/6000.0/script-reference/unity/properties/propertypath.md). |
| [this\[\]](/engine/6000.0/script-reference/unity/properties/propertypath/item.md)   | Gets the [PropertyPathPart](/engine/6000.0/script-reference/unity/properties/propertypathpart.md) at the given index.        |
| [Length](/engine/6000.0/script-reference/unity/properties/propertypath/length.md)   | Gets the number of parts contained in the [PropertyPath](/engine/6000.0/script-reference/unity/properties/propertypath.md).  |

## Methods

| Method                                                                            | Description                                                       |
| --------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
| [Equals](/engine/6000.0/script-reference/unity/properties/propertypath/equals.md) | Indicates whether this instance and a specified object are equal. |

## Static Methods

| Method                                                                                            | Description                                                                                                                                                                                                                                                                                                                                             |
| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [AppendIndex](/engine/6000.0/script-reference/unity/properties/propertypath/appendindex.md)       | Returns a new [PropertyPath](/engine/6000.0/script-reference/unity/properties/propertypath.md) combining the given [PropertyPath](/engine/6000.0/script-reference/unity/properties/propertypath.md) and an index-type [PropertyPathPart](/engine/6000.0/script-reference/unity/properties/propertypathpart.md).                                         |
| [AppendKey](/engine/6000.0/script-reference/unity/properties/propertypath/appendkey.md)           | Returns a new [PropertyPath](/engine/6000.0/script-reference/unity/properties/propertypath.md) combining the given [PropertyPath](/engine/6000.0/script-reference/unity/properties/propertypath.md) and an key-type [PropertyPathPart](/engine/6000.0/script-reference/unity/properties/propertypathpart.md).                                           |
| [AppendName](/engine/6000.0/script-reference/unity/properties/propertypath/appendname.md)         | Returns a new [PropertyPath](/engine/6000.0/script-reference/unity/properties/propertypath.md) combining the given [PropertyPath](/engine/6000.0/script-reference/unity/properties/propertypath.md) and an name-type [PropertyPathPart](/engine/6000.0/script-reference/unity/properties/propertypathpart.md).                                          |
| [AppendPart](/engine/6000.0/script-reference/unity/properties/propertypath/appendpart.md)         | Returns a new [PropertyPath](/engine/6000.0/script-reference/unity/properties/propertypath.md) combining the given [PropertyPath](/engine/6000.0/script-reference/unity/properties/propertypath.md) and [PropertyPathPart](/engine/6000.0/script-reference/unity/properties/propertypathpart.md).                                                       |
| [AppendProperty](/engine/6000.0/script-reference/unity/properties/propertypath/appendproperty.md) | Returns a new [PropertyPath](/engine/6000.0/script-reference/unity/properties/propertypath.md) combining the given [PropertyPath](/engine/6000.0/script-reference/unity/properties/propertypath.md) and a [PropertyPathPart](/engine/6000.0/script-reference/unity/properties/propertypathpart.md) whose type will be based on the property interfaces. |
| [Combine](/engine/6000.0/script-reference/unity/properties/propertypath/combine.md)               | Returns a new [PropertyPath](/engine/6000.0/script-reference/unity/properties/propertypath.md) combining the parts of the two given [PropertyPath](/engine/6000.0/script-reference/unity/properties/propertypath.md).                                                                                                                                   |
| [FromIndex](/engine/6000.0/script-reference/unity/properties/propertypath/fromindex.md)           | Returns a new [PropertyPath](/engine/6000.0/script-reference/unity/properties/propertypath.md) from the provided index.                                                                                                                                                                                                                                 |
| [FromKey](/engine/6000.0/script-reference/unity/properties/propertypath/fromkey.md)               | Returns a new [PropertyPath](/engine/6000.0/script-reference/unity/properties/propertypath.md) from the provided key.                                                                                                                                                                                                                                   |
| [FromName](/engine/6000.0/script-reference/unity/properties/propertypath/fromname.md)             | Returns a new [PropertyPath](/engine/6000.0/script-reference/unity/properties/propertypath.md) from the provided name.                                                                                                                                                                                                                                  |
| [FromPart](/engine/6000.0/script-reference/unity/properties/propertypath/frompart.md)             | Returns a new [PropertyPath](/engine/6000.0/script-reference/unity/properties/propertypath.md) from the provided [PropertyPathPart](/engine/6000.0/script-reference/unity/properties/propertypathpart.md).                                                                                                                                              |
| [Pop](/engine/6000.0/script-reference/unity/properties/propertypath/pop.md)                       | Returns a new [PropertyPath](/engine/6000.0/script-reference/unity/properties/propertypath.md) that will not include the last [PropertyPathPart](/engine/6000.0/script-reference/unity/properties/propertypathpart.md).                                                                                                                                 |
| [SubPath](/engine/6000.0/script-reference/unity/properties/propertypath/subpath.md)               | Returns a new [PropertyPath](/engine/6000.0/script-reference/unity/properties/propertypath.md) containing the [PropertyPathPart](/engine/6000.0/script-reference/unity/properties/propertypathpart.md) starting at the given start index.                                                                                                               |
