# SubPath

> Returns a new PropertyPath containing the PropertyPathPart starting at the given start index.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Properties](/engine/6000.5/script-reference/unity/properties.md)
* **Assembly:** UnityEngine.PropertiesModule

## SubPath(PropertyPath, int)

Returns a new [PropertyPath](/engine/6000.5/script-reference/unity/properties/propertypath.md) containing the [PropertyPathPart](/engine/6000.5/script-reference/unity/properties/propertypathpart.md) starting at the given start index.

```csharp
public static PropertyPath SubPath(in PropertyPath path, int startIndex)
```

### Parameters

**** (\[PropertyPath]\(/engine/6000.5/script-reference/unity/properties/propertypath)): The [PropertyPath](/engine/6000.5/script-reference/unity/properties/propertypath.md)**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The zero-based index where the sub path should start.

### Returns

| Type                                                                             | Description                                                                            |
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| [PropertyPath](/engine/6000.5/script-reference/unity/properties/propertypath.md) | A new [PropertyPath](/engine/6000.5/script-reference/unity/properties/propertypath.md) |

## SubPath(PropertyPath, int, int)

Returns a new [PropertyPath](/engine/6000.5/script-reference/unity/properties/propertypath.md) containing the given number of [PropertyPathPart](/engine/6000.5/script-reference/unity/properties/propertypathpart.md) starting at the given start index.

```csharp
public static PropertyPath SubPath(in PropertyPath path, int startIndex, int length)
```

### Parameters

**** (\[PropertyPath]\(/engine/6000.5/script-reference/unity/properties/propertypath)): The [PropertyPath](/engine/6000.5/script-reference/unity/properties/propertypath.md)**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The zero-based index where the sub path should start.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The number of parts to include.

### Returns

| Type                                                                             | Description                                                                            |
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| [PropertyPath](/engine/6000.5/script-reference/unity/properties/propertypath.md) | A new [PropertyPath](/engine/6000.5/script-reference/unity/properties/propertypath.md) |
