> For the complete documentation index, see [llms.txt](https://docs.yarnspinner.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.unity/yarn.unity.iassetprovider.md).

# IAssetProvider

Interface in [Yarn.Unity](/3.1/api/csharp/yarn.unity.md)

## Summary

Contains methods for accessing assets of a given type stored within an object.

```csharp
public interface IAssetProvider
```

## Methods

| Name                                                                                                                   | Description                                              |
| ---------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------- |
| [GetAssetsOfType()](/3.1/api/csharp/yarn.unity/yarn.unity.iassetprovider/yarn.unity.iassetprovider.getassetsoftype.md) | Gets a collection of assets of type `T` from the target. |
| [TryGetAsset(T?)](/3.1/api/csharp/yarn.unity/yarn.unity.iassetprovider/yarn.unity.iassetprovider.trygetasset.md)       | Attempts to fetch an asset of type `T` from the object.  |
