Header menu logo Mibo

IAssets Type

Per-game asset loader/cache service for the MonoGame backend.

Provides cached loading for textures, fonts, sounds, models, and effects via the MonoGame content pipeline. Extends IAssetCache so portable code can cache custom assets without referencing a backend.

Example

 let assets = GameContext.getService<IAssets> ctx
 let tex = assets.Texture "sprites/player"
 let font = assets.Font "fonts/main"
 let config = assets.GetOrCreate "gameConfig" (fun () -> loadConfig())
val assets: obj
val tex: obj
val font: obj
val config: obj

Instance members

Instance member Description

this.Effect

Full Usage: this.Effect

Parameters:
    path : string

Returns: Effect
Modifiers: abstract

Loads and caches an Effect from the content pipeline.

path : string
Returns: Effect

this.Font

Full Usage: this.Font

Parameters:
    path : string

Returns: SpriteFont
Modifiers: abstract

Loads and caches a SpriteFont from the content pipeline.

path : string
Returns: SpriteFont

this.Model

Full Usage: this.Model

Parameters:
    path : string

Returns: Model
Modifiers: abstract

Loads and caches a 3D Model from the content pipeline.

path : string
Returns: Model

this.Sound

Full Usage: this.Sound

Parameters:
    path : string

Returns: SoundEffect
Modifiers: abstract

Loads and caches a SoundEffect from the content pipeline.

path : string
Returns: SoundEffect

this.Texture

Full Usage: this.Texture

Parameters:
    path : string

Returns: Texture2D
Modifiers: abstract

Loads and caches a Texture2D from the content pipeline.

path : string
Returns: Texture2D

Type something to start searching.