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.
from VertexEngine.assets import AssetManager
player_img = AssetManager.load_image(
"player",
"assets/images/player.png"
)
name (str):
A unique identifier assigned to the image. This name is later
used to retrieve the image from the AssetManager.
path (str):
The file path to the image to load. Common supported formats
include .png, .jpg, and .bmp,
depending on the image backend.
Image object — The loaded image. This object can be stored in a variable, drawn to surfaces, transformed, or managed internally by the AssetManager.