Vertex Docs

AssetManager.load_image(name, path)

Description: Loads an image file from disk into the AssetManager and registers it under a user-defined name. Once loaded, the image can be retrieved instantly using AssetManager.get_image(), allowing assets to be reused across scenes and systems without repeated disk access.

Usage

from VertexEngine.assets import AssetManager

player_img = AssetManager.load_image(
    "player",
    "assets/images/player.png"
)

Parameters

Returns

Image object — The loaded image. This object can be stored in a variable, drawn to surfaces, transformed, or managed internally by the AssetManager.

Notes