A function defined in BBMOD_Resource.gml
from_file_async(_file[, _sha1[, _callback]])
Asynchronnously loads the resource from a file.
Name | Type | Description |
---|---|---|
_file | String |
The path to the file. |
_sha1 | String |
Expected SHA1 of the file. If the actual one does not match with this, then the resource will not be loaded. Use undefined if you do not want to check the SHA1 of the file. |
_callback | Function |
The function to execute when the resource is loaded or if an error occurs or. It must take the error as the first argument and the resource as the second argument. If no error occurs, then undefined is passed. Defaults to undefined . |
Struct.BBMOD_Resource
Returns self
.
Do not forget to call bbmod_async_save_load_update and bbmod_async_image_loaded_update in appropriate events when using asynchronnous loading! You can also use BBMOD_ResourceManager for unified asynchronnous loading of resources.
Copyright © 2025, BlueBurn. Built on January 04, 2025 using GMDoc.