TextureAssetΒΆ

class TextureAsset : System.MarshalByRefObject, IAsset, Protogame.INativeAsset

A texture asset.

This represents a texture, stored in a Protogame asset.

readonly bool CompiledOnly

Gets a value indicating whether the asset only contains compiled information.

Value:Whether the asset only contains compiled information.
readonly string Name

Gets the name of the asset.

Value:The name of the asset.
Protogame.PlatformData PlatformData

Gets or sets the platform-specific data associated with this asset.

Value:The platform-specific data for this asset.
System.Byte[] RawData

Gets or sets the raw texture data. This is the source information used to compile the asset.

Value:The raw texture data.
readonly bool SourceOnly

Gets a value indicating whether the asset only contains source information.

Value:Whether the asset only contains source information.
readonly bool SourcedFromRaw

Gets a value indicating whether or not this asset was sourced from a raw file (such as a PNG image).

Value:The sourced from raw.
readonly Texture2D Texture

Gets the runtime, MonoGame texture.

Value:The MonoGame texture.
public void ReadyOnGameThread()

Reloads the texture from the associated compiled data. After compilation of the texture asset, this reloads the MonoGame representation of the texture so that the Texture property correctly represents a texture based on the compiled data.

public Protogame.T Resolve<T>()

Attempt to resolve this asset to the specified type.

Type Parameters:
 
  • T – The target type of the asset.
Returns:

The current asset as a :T.