Skip to main content
Version: 1.0.0-preview.33

Velaptor.Content.AtlasLoader

Velaptor

Velaptor.Content

AtlasLoader Class

Loads atlas data.

public sealed class AtlasLoader :
Velaptor.Content.ILoader<Velaptor.Content.IAtlasData>

Inheritance System.Object → AtlasLoader

Implements Velaptor.Content.ILoader<IAtlasData>

Constructors

AtlasLoader() Constructor

Initializes a new instance of the AtlasLoader class.

public AtlasLoader();

Methods

Load(string)

Loads texture atlas data using the given contentPathOrName.

public Velaptor.Content.IAtlasData Load(string contentPathOrName);

Parameters

contentPathOrName System.String

The content name or file path to the atlas data.

Implements Load(string)

Returns

IAtlasData
The loaded atlas data.

Exceptions

System.ArgumentNullException
Thrown if the contentPathOrName is null or empty.

LoadTextureException
Thrown if the resulting texture content file path is invalid.

System.IO.FileNotFoundException
Thrown if the texture file does not exist.

System.IO.IOException
The directory specified a file or the network name is not known.

System.UnauthorizedAccessException
The caller does not have the required permissions.

System.IO.PathTooLongException
The specified path, file name, or both exceed the system-defined maximum length.

System.IO.DirectoryNotFoundException
The specified path is invalid (for example, it is on an unmapped drive).

System.NotSupportedException
The path contains a colon character : that is not part of a drive label.

Remarks

Valid Values:

  • MyAtlas
  • C:/Atlas/MyAtlas.png
  • C:/Atlas/MyAtlas.json

Invalid Values:

  • C:/Atlas/MyAtlas
  • C:/Atlas/MyAtlas.txt

Unload(string)

Unloads the data with the given contentPathOrName.

public void Unload(string contentPathOrName);

Parameters

contentPathOrName System.String

The name of the content item to unload.

Implements Unload(string)