Interface IDalamudAssetManager
Holds Dalamud Assets' handles hostage, so that they do not get closed while Dalamud is running.
Also, attempts to load optional assets.
<strong>Note on System.Diagnostics.Contracts.PureAttribute</strong>
It will help you get notified if you discard the result of functions, mostly likely because of a mistake. Think of C++ [[nodiscard]]. Also, like the intended meaning of the attribute, such methods will not have externally visible state changes.
Assembly: Dalamud.dll
public interface IDalamudAssetManager
Properties
Empty4X4
Gets the shared texture wrap for Dalamud.DalamudAsset.Empty4X4.
IDalamudTextureWrap Empty4X4 { get; }
White4X4
Gets the shared texture wrap for Dalamud.DalamudAsset.White4X4.
IDalamudTextureWrap White4X4 { get; }
Methods
IsStreamImmediatelyAvailable(DalamudAsset)
Gets whether the stream for the asset is instantly available.
bool IsStreamImmediatelyAvailable(DalamudAsset asset)
Returns
System.Boolean: Whether the stream of an asset is immediately available.
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.DalamudAsset | asset | The asset. |
CreateStream(DalamudAsset)
Creates a stream backed by the specified asset, waiting as necessary.
<strong>Call System.IDisposable.Dispose after use.</strong>
Stream CreateStream(DalamudAsset asset)
Returns
System.IO.Stream: The stream.
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.DalamudAsset | asset | The asset. |
CreateStreamAsync(DalamudAsset)
Creates a stream backed by the specified asset.
<strong>Call System.IDisposable.Dispose after use.</strong>
Task<Stream> CreateStreamAsync(DalamudAsset asset)
Returns
System.Threading.Tasks.Task<System.IO.Stream>: The stream, wrapped inside a System.IO.Stream.
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.DalamudAsset | asset | The asset. |
GetDalamudTextureWrap(DalamudAsset)
Gets a shared instance of Dalamud.Interface.Textures.TextureWraps.IDalamudTextureWrap, after waiting as necessary.
Calls to System.IDisposable.Dispose is unnecessary; they will be ignored.
IDalamudTextureWrap GetDalamudTextureWrap(DalamudAsset asset)
Returns
Dalamud.Interface.Textures.TextureWraps.IDalamudTextureWrap: The texture wrap.
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.DalamudAsset | asset | The texture asset. |
GetDalamudTextureWrap(DalamudAsset, IDalamudTextureWrap?)
Gets a shared instance of Dalamud.Interface.Textures.TextureWraps.IDalamudTextureWrap if it is available instantly; if it is not ready, returns <code class="paramref">defaultWrap</code>.
Calls to System.IDisposable.Dispose is unnecessary; they will be ignored.
IDalamudTextureWrap? GetDalamudTextureWrap(DalamudAsset asset, IDalamudTextureWrap? defaultWrap)
Returns
Dalamud.Interface.Textures.TextureWraps.IDalamudTextureWrap: The texture wrap. Can be null only if <code class="paramref">defaultWrap</code> is null.
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.DalamudAsset | asset | The texture asset. |
| Dalamud.Interface.Textures.TextureWraps.IDalamudTextureWrap | defaultWrap | The default return value, if the asset is not ready for whatever reason. |
GetDalamudTextureWrapAsync(DalamudAsset)
Gets a shared instance of Dalamud.Interface.Textures.TextureWraps.IDalamudTextureWrap in a System.Threading.Tasks.Task%601.
Calls to System.IDisposable.Dispose is unnecessary; they will be ignored.
Task<IDalamudTextureWrap> GetDalamudTextureWrapAsync(DalamudAsset asset)
Returns
System.Threading.Tasks.Task<Dalamud.Interface.Textures.TextureWraps.IDalamudTextureWrap>: The new texture wrap, wrapped inside a System.Threading.Tasks.Task%601.
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.DalamudAsset | asset | The texture asset. |