# AddExternalProjectDependency(PBXProject, string, string, PBXSourceTree)

> Adds an external project dependency to the project.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.iOS.Xcode.Extensions](/engine/6000.3/script-reference/unityeditor/ios/xcode/extensions.md)
* **Assembly:** UnityEditor.iOS.Extensions.Xcode

```csharp
public static void AddExternalProjectDependency(this PBXProject proj, string path, string projectPath, PBXSourceTree sourceTree)
```

### Parameters

**** (\[PBXProject]\(/engine/6000.3/script-reference/unityeditor/ios/xcode/pbxproject)): **** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The path to the external Xcode project (the .xcodeproj file).**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The project path to the new project.**** (\[PBXSourceTree]\(/engine/6000.3/script-reference/unityeditor/ios/xcode/pbxsourcetree)): The source tree the path is relative to. The [PBXSourceTree.Group](/engine/6000.3/script-reference/unityeditor/ios/xcode/pbxsourcetree/group.md) tree is not supported.
