# IAssetProvider

Interface in [Yarn.Unity](https://docs.yarnspinner.dev/api/csharp/yarn.unity)

## Summary

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

```csharp
public interface IAssetProvider
```

## Methods

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