Skip to main content
Version: 1.0.0-preview.44

Velaptor.Content.IContentManager

Velaptor

Velaptor.Content

IContentManager Interface

Loads various types of content.

public interface IContentManager

Derived
ContentManager

Methods

Load<T>(string)

Loads the specified pathOrName for the given type T.

T Load<T>(string pathOrName)
where T : Velaptor.Content.IContent;

Type parameters

T

The type of content to use.

Parameters

pathOrName System.String

The content file path or name.

Returns

T
The content object.

Remarks

When loading audio content, the default Full used will be used.
To specify a different buffer type, use the LoadAudio(string, AudioBuffer) method.

When loading font content, the default size of 12 will be used.
To specify a different size, use the LoadFont(string, uint) method.

If the pathOrName is a fully qualified file path, an attempt will be made to load the content
using the file path directly. If the pathOrName is just the name of the content item,
the content manager system will try to find and resolve the location of the content item automatically.

Only loads the following built in IContent types.

LoadAudio(string, AudioBuffer)

Loads a font with the given pathOrName and bufferType.

Velaptor.Content.IAudio LoadAudio(string pathOrName, Velaptor.Content.AudioBuffer bufferType);

Parameters

pathOrName System.String

The font file path or name.

bufferType AudioBuffer

The buffer mode of the audio.

Returns

IAudio
The loaded audio.

Remarks

If the pathOrName is a fully qualified file path, an attempt will be made to load the content
using the file path directly. If the pathOrName is just the name of the content item,
the content manager system will try to find and resolve the location of the content item automatically.

LoadFont(string, uint)

Loads a font with the given pathOrName and size.

Velaptor.Content.Fonts.IFont LoadFont(string pathOrName, uint size);

Parameters

pathOrName System.String

The font file path or name.

size System.UInt32

The size of the font.

Returns

IFont
The loaded font.

Remarks

If the pathOrName is a fully qualified file path, an attempt will be made to load the content
using the file path directly. If the pathOrName is just the name of the content item,
the content manager system will try to find and resolve the location of the content item automatically.

Unload<T>(T)

Unloads the given item.

void Unload<T>(T item)
where T : Velaptor.Content.IContent;

Type parameters

T

The type of content item to unload.

Parameters

item T

The content item.

Remarks

Only unloads the following built in IContent types.