# LoadFromPath(string)

> Loads an assembly from the specified file path.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.Assemblies](/engine/6000.6/script-reference/unityengine/assemblies.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public static Assembly LoadFromPath(string assemblyPath)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The fully qualified path of the assembly.

### Returns

| Type                                                                          | Description          |
| ----------------------------------------------------------------------------- | -------------------- |
| [Assembly](https://learn.microsoft.com/dotnet/api/system.reflection.assembly) | The loaded assembly. |

### Remarks

Unity automatically loads [script assemblies](/engine/6000.6/manual/scripting/compilation-and-code-reload/script-compilation/assembly-definition-files/assembly-definitions-intro.md) and [managed plug-ins](/engine/6000.6/manual/scripting/compilation-and-code-reload/plug-ins/managed.md). To load any other assemblies from a file, use this API. This is a safer alternative to .NET's [Assembly.LoadFrom(string)](https://learn.microsoft.com/en-us/dotnet/api/system.reflection.assembly.loadfrom#system-reflection-assembly-loadfrom\(system-string\)) in the Unity context. Unlike `Assembly.LoadFrom`, assemblies loaded with this API are guaranteed to work correctly with code reload.

Additional Resources: [CurrentAssemblies.LoadFromBytes](/engine/6000.6/script-reference/unityengine/assemblies/currentassemblies/loadfrombytes.md).

### Examples

```csharp
using UnityEditor;
using UnityEngine;
using UnityEngine.Assemblies;

public class AssemblyLoadingFromPath
{
    [MenuItem("Test/Load Assembly From Path")]
    static void LoadAssemblyFromPath()
    {
        var assembly = CurrentAssemblies.LoadFromPath(@"C:\Some\Path\To\TheAssembly.dll");
        Debug.Log(assembly.FullName);
    }
}
```
