# GetAssemblies

> Get all script assemblies compiled by Unity, filtered by AssembliesType.

## Definition

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

## GetAssemblies()

Get all script assemblies compiled by Unity, filtered by [AssembliesType](/engine/6000.5/script-reference/unityeditor/compilation/assembliestype.md).

```csharp
public static Assembly[] GetAssemblies()
```

### Returns

| Type                                                                                | Description                                   |
| ----------------------------------------------------------------------------------- | --------------------------------------------- |
| [Assembly\[\]](/engine/6000.5/script-reference/unityeditor/compilation/assembly.md) | Array of script assemblies compiled by Unity. |

### Remarks

This is a build-time view of the assemblies that Unity's compilation pipeline produces from your script files, including predefined assemblies like `Assembly-CSharp` and any assemblies you define with Assembly Definition (`.asmdef`) files.

It returns an array of [Assembly](/engine/6000.5/script-reference/unityeditor/compilation/assembly.md) objects, which are metadata descriptions, not to be confused with loaded `System.Reflection.Assembly` instances. Each entry includes information such as the assembly name, its source files, output path, references, defines, and compiler options.

The assemblies are filtered by [AssembliesType](/engine/6000.5/script-reference/unityeditor/compilation/assembliestype.md) so you can determine what the Player build would compile while in the Editor. This API is Editor-only and reflects the project's script structure regardless of whether those assemblies are currently loaded or successfully compiled into the runtime.

**Important**: Don't confuse this with the view of assemblies loaded into the current runtime execution context, which can be obtained through [CurrentAssemblies.GetLoadedAssemblies](/engine/6000.5/script-reference/unityengine/assemblies/currentassemblies/getloadedassemblies.md).

Additional Resources: [Assembly](/engine/6000.5/script-reference/unityeditor/compilation/assembly.md).

## GetAssemblies(AssembliesType)

Get all script assemblies compiled by Unity, filtered by [AssembliesType](/engine/6000.5/script-reference/unityeditor/compilation/assembliestype.md).

```csharp
public static Assembly[] GetAssemblies(AssembliesType assembliesType)
```

### Parameters

**** (\[AssembliesType]\(/engine/6000.5/script-reference/unityeditor/compilation/assembliestype)):&#x20;

### Returns

| Type                                                                                | Description                                   |
| ----------------------------------------------------------------------------------- | --------------------------------------------- |
| [Assembly\[\]](/engine/6000.5/script-reference/unityeditor/compilation/assembly.md) | Array of script assemblies compiled by Unity. |

### Remarks

This is a build-time view of the assemblies that Unity's compilation pipeline produces from your script files, including predefined assemblies like `Assembly-CSharp` and any assemblies you define with Assembly Definition (`.asmdef`) files.

It returns an array of [Assembly](/engine/6000.5/script-reference/unityeditor/compilation/assembly.md) objects, which are metadata descriptions, not to be confused with loaded `System.Reflection.Assembly` instances. Each entry includes information such as the assembly name, its source files, output path, references, defines, and compiler options.

The assemblies are filtered by [AssembliesType](/engine/6000.5/script-reference/unityeditor/compilation/assembliestype.md) so you can determine what the Player build would compile while in the Editor. This API is Editor-only and reflects the project's script structure regardless of whether those assemblies are currently loaded or successfully compiled into the runtime.

**Important**: Don't confuse this with the view of assemblies loaded into the current runtime execution context, which can be obtained through [CurrentAssemblies.GetLoadedAssemblies](/engine/6000.5/script-reference/unityengine/assemblies/currentassemblies/getloadedassemblies.md).

Additional Resources: [Assembly](/engine/6000.5/script-reference/unityeditor/compilation/assembly.md).
