Skip to main content

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
View Source
Declaration
public interface IDalamudAssetManager

Properties

Empty4X4

Gets the shared texture wrap for Dalamud.DalamudAsset.Empty4X4.

View Source
Declaration
IDalamudTextureWrap Empty4X4 { get; }

White4X4

Gets the shared texture wrap for Dalamud.DalamudAsset.White4X4.

View Source
Declaration
IDalamudTextureWrap White4X4 { get; }

Methods

IsStreamImmediatelyAvailable(DalamudAsset)

Gets whether the stream for the asset is instantly available.

View Source
Declaration
[Pure]
bool IsStreamImmediatelyAvailable(DalamudAsset asset)
Returns

System.Boolean: Whether the stream of an asset is immediately available.

Parameters
TypeNameDescription
Dalamud.DalamudAssetassetThe asset.

CreateStream(DalamudAsset)

Creates a stream backed by the specified asset, waiting as necessary.

<strong>Call System.IDisposable.Dispose after use.</strong>

View Source
Declaration
[Pure]
Stream CreateStream(DalamudAsset asset)
Returns

System.IO.Stream: The stream.

Parameters
TypeNameDescription
Dalamud.DalamudAssetassetThe asset.

CreateStreamAsync(DalamudAsset)

Creates a stream backed by the specified asset.

<strong>Call System.IDisposable.Dispose after use.</strong>

View Source
Declaration
[Pure]
Task<Stream> CreateStreamAsync(DalamudAsset asset)
Returns

System.Threading.Tasks.Task<System.IO.Stream>: The stream, wrapped inside a System.IO.Stream.

Parameters
TypeNameDescription
Dalamud.DalamudAssetassetThe 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.

View Source
Declaration
[Pure]
IDalamudTextureWrap GetDalamudTextureWrap(DalamudAsset asset)
Returns

Dalamud.Interface.Textures.TextureWraps.IDalamudTextureWrap: The texture wrap.

Parameters
TypeNameDescription
Dalamud.DalamudAssetassetThe 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.

View Source
Declaration
[Pure]
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
TypeNameDescription
Dalamud.DalamudAssetassetThe texture asset.
Dalamud.Interface.Textures.TextureWraps.IDalamudTextureWrapdefaultWrapThe 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.

View Source
Declaration
[Pure]
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
TypeNameDescription
Dalamud.DalamudAssetassetThe texture asset.