0

Is there any generic way of loading resources runtime in monogame. Like loading Texture2d would be like this

        Texture2D.FromStream(graphixDevice,someStream)

is there something like Resource<Texture2D>.LoadFromStream(stream);

1 Answers1

0

The preferred way of loading assets is through ContentManager. The Load<T> method is generic, but requires the asset be processed with the Content Pipeline. The asset is optimized and stored in a fast-to-load format along with all dependencies (textures for model, etc.).

The type-specific FromStream methods exist only for the few cases where the content can't be preprocessed, eg. user-generated content.

Petri Laarne
  • 421
  • 3
  • 7