# LoadAssetAtPath

> Returns a resource at an asset path (Editor Only).

## Definition

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

## LoadAssetAtPath(string, Type)

Returns a resource at an asset path (Editor Only).

> **Warning:**
>
> **Removed.** Use AssetDatabase.LoadAssetAtPath instead
>
> **Upgrade to** [AssetDatabase.LoadAssetAtPath](/engine/6000.7/script-reference/unityeditor/assetdatabase/loadassetatpath.md)

```csharp
public static Object LoadAssetAtPath(string assetPath, Type type)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Pathname of the target asset.**** (\[Type]\(https\://learn.microsoft.com/dotnet/api/system.type)): Type filter for objects returned.

### Returns

| Type                                                            | Description |
| --------------------------------------------------------------- | ----------- |
| [Object](/engine/6000.7/script-reference/unityengine/object.md) |             |

### Remarks

This function always return null in the standalone player or web player. This is useful for quickly accessing an asset for use in the editor only.

**Note:** All asset names and paths in Unity use forward slashes, paths using backslashes will **not** work.

This returns only asset object that is visible in the Project view.

Resources.LoadAssetAtPath is deprecated. Use [AssetDatabase.LoadAssetAtPath](/engine/6000.7/script-reference/unityeditor/assetdatabase/loadassetatpath.md) instead.

Note that web player is not supported from 5.4.0 onwards.

## LoadAssetAtPath\<T>(string)

Returns a resource at an asset path (Editor Only).

> **Warning:**
>
> **Removed.** Use AssetDatabase.LoadAssetAtPath\\\<T\\>() instead
>
> **Upgrade to** [AssetDatabase.LoadAssetAtPath](/engine/6000.7/script-reference/unityeditor/assetdatabase/loadassetatpath.md)

```csharp
public static T LoadAssetAtPath<T>(string assetPath) where T : Object
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Pathname of the target asset.

### Returns

| Type | Description |
| ---- | ----------- |
| T    |             |

### Remarks

This function always return null in the standalone player or web player. This is useful for quickly accessing an asset for use in the editor only.

**Note:** All asset names and paths in Unity use forward slashes, paths using backslashes will **not** work.

This returns only asset object that is visible in the Project view.

Note that web player is not supported from 5.4.0 onwards.
