# GetPlaybackEngineDirectory

> Gets the path of the Player directory for a build target.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/7000.0/script-reference/unityeditor.md)
* **Assembly:** UnityEditor.CoreModule

## GetPlaybackEngineDirectory(BuildTarget, BuildOptions)

Gets the path of the Player directory for a build target.

```csharp
public static string GetPlaybackEngineDirectory(BuildTarget target, BuildOptions options)
```

### Parameters

**** (\[BuildTarget]\(/engine/7000.0/script-reference/unityeditor/buildtarget)): The build target to get the Player directory for.**** (\[BuildOptions]\(/engine/7000.0/script-reference/unityeditor/buildoptions)): The build options for the Player.

### Returns

| Type                                                           | Description                                                      |
| -------------------------------------------------------------- | ---------------------------------------------------------------- |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | The path to the Player directory for the specified build target. |

### Remarks

For example, `Editor\Data\PlaybackEngines\AndroidPlayer`. The path can depend on [BuildOptions.Development](/engine/7000.0/script-reference/unityeditor/buildoptions/development.md). If the build target isn't supported, this overload logs an error.

## GetPlaybackEngineDirectory(BuildTarget, BuildOptions, bool)

Gets the path of the Player directory for a build target, with the option to suppress errors for unsupported targets.

```csharp
public static string GetPlaybackEngineDirectory(BuildTarget target, BuildOptions options, bool assertUnsupportedPlatforms)
```

### Parameters

**** (\[BuildTarget]\(/engine/7000.0/script-reference/unityeditor/buildtarget)): The build target to get the Player directory for.**** (\[BuildOptions]\(/engine/7000.0/script-reference/unityeditor/buildoptions)): The build options for the Player.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Set to true to log an error if the build target isn't supported. Set to false to return an empty string instead.

### Returns

| Type                                                           | Description                                                      |
| -------------------------------------------------------------- | ---------------------------------------------------------------- |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | The path to the Player directory for the specified build target. |

### Remarks

For example, `Editor\Data\PlaybackEngines\AndroidPlayer`. The path can depend on [BuildOptions.Development](/engine/7000.0/script-reference/unityeditor/buildoptions/development.md).

## GetPlaybackEngineDirectory(BuildTargetGroup, BuildTarget, BuildOptions)

Gets the path of the Player directory for a build target in a build target group.

```csharp
public static string GetPlaybackEngineDirectory(BuildTargetGroup buildTargetGroup, BuildTarget target, BuildOptions options)
```

### Parameters

**** (\[BuildTargetGroup]\(/engine/7000.0/script-reference/unityeditor/buildtargetgroup)): The build target group that the build target belongs to.**** (\[BuildTarget]\(/engine/7000.0/script-reference/unityeditor/buildtarget)): The build target to get the Player directory for.**** (\[BuildOptions]\(/engine/7000.0/script-reference/unityeditor/buildoptions)): The build options for the Player.

### Returns

| Type                                                           | Description                                                      |
| -------------------------------------------------------------- | ---------------------------------------------------------------- |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | The path to the Player directory for the specified build target. |

### Remarks

For example, `Editor\Data\PlaybackEngines\AndroidPlayer`. The path can depend on [BuildOptions.Development](/engine/7000.0/script-reference/unityeditor/buildoptions/development.md). If the build target isn't supported, this overload logs an error.

## GetPlaybackEngineDirectory(BuildTargetGroup, BuildTarget, BuildOptions, bool)

Gets the path of the Player directory for a build target in a build target group, with the option to suppress errors for unsupported targets.

```csharp
public static string GetPlaybackEngineDirectory(BuildTargetGroup buildTargetGroup, BuildTarget target, BuildOptions options, bool assertUnsupportedPlatforms)
```

### Parameters

**** (\[BuildTargetGroup]\(/engine/7000.0/script-reference/unityeditor/buildtargetgroup)): The build target group that the build target belongs to.**** (\[BuildTarget]\(/engine/7000.0/script-reference/unityeditor/buildtarget)): The build target to get the Player directory for.**** (\[BuildOptions]\(/engine/7000.0/script-reference/unityeditor/buildoptions)): The build options for the Player.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Set to true to log an error if the build target isn't supported. Set to false to return an empty string instead.

### Returns

| Type                                                           | Description                                                      |
| -------------------------------------------------------------- | ---------------------------------------------------------------- |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | The path to the Player directory for the specified build target. |

### Remarks

For example, `Editor\Data\PlaybackEngines\AndroidPlayer`. The path can depend on [BuildOptions.Development](/engine/7000.0/script-reference/unityeditor/buildoptions/development.md).
