# IExternalCodeEditor

> Defines the responsibilities of handling external script editor integration into UnityEditor.

## Definition

* **Type:** Interface
* **Namespace:** [Unity.CodeEditor](/engine/6000.5/script-reference/unity/codeeditor.md)
* **Assembly:** UnityEditor.CoreModule

```csharp
public interface IExternalCodeEditor
```

## Properties

| Property                                                                                               | Description                                                                                |
| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
| [Installations](/engine/6000.5/script-reference/unity/codeeditor/iexternalcodeeditor/installations.md) | Provide the editor with a list of known and supported editors that this instance supports. |

## Methods

| Method                                                                                                                         | Description                                                                                                                                                                                                                                                                                                                                                                                               |
| ------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Initialize](/engine/6000.5/script-reference/unity/codeeditor/iexternalcodeeditor/initialize.md)                               | Callback to the [IExternalCodeEditor](/engine/6000.5/script-reference/unity/codeeditor/iexternalcodeeditor.md) when it has been chosen from the PreferenceWindow.                                                                                                                                                                                                                                         |
| [OnGUI](/engine/6000.5/script-reference/unity/codeeditor/iexternalcodeeditor/ongui.md)                                         | Unity calls this method when it populates "Preferences/External Tools" in order to allow the code editor to generate necessary GUI. For example, when creating an an argument field for modifying the arguments sent to the code editor.                                                                                                                                                                  |
| [OpenProject](/engine/6000.5/script-reference/unity/codeeditor/iexternalcodeeditor/openproject.md)                             | The external code editor needs to handle the request to open a file.                                                                                                                                                                                                                                                                                                                                      |
| [SyncAll](/engine/6000.5/script-reference/unity/codeeditor/iexternalcodeeditor/syncall.md)                                     | Unity calls this function during initialization in order to sync the Project. This is different from [IExternalCodeEditor.SyncIfNeeded](/engine/6000.5/script-reference/unity/codeeditor/iexternalcodeeditor/syncifneeded.md) in that it does not get a list of changes.                                                                                                                                  |
| [SyncIfNeeded](/engine/6000.5/script-reference/unity/codeeditor/iexternalcodeeditor/syncifneeded.md)                           | When you change Assets in Unity, this method for the current chosen instance of [IExternalCodeEditor](/engine/6000.5/script-reference/unity/codeeditor/iexternalcodeeditor.md) parses the new and changed Assets.                                                                                                                                                                                         |
| [TryGetInstallationForPath](/engine/6000.5/script-reference/unity/codeeditor/iexternalcodeeditor/trygetinstallationforpath.md) | Unity stores the path of the chosen editor. An instance of [IExternalCodeEditor](/engine/6000.5/script-reference/unity/codeeditor/iexternalcodeeditor.md) can take responsibility for this path, by returning true when this method is being called. The `out` variable **installation** need to be constructed with the path and the name that should be shown in the "External Tools" code editor list. |
