from_file_async

function

from_file_async(_file[, _sha1[, _callback]])

Description

Asynchronnously loads the resource from a file.

Arguments

Name Type Description
_file String The path to the file.
_sha1 String/Undefined Expected SHA1 of the file. If the actual one does not match with this, then the resource will not be loaded.
_callback Function/Undefined The function to execute when the resource is loaded or if an error occurs. It must take the error as the first argument and the resource as the second argument. If no error occurs, then undefined is passed.

Returns

Struct.BBMOD_Resource Returns self.

Note

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.

Do you find this page helpful?

Copyright © 2022, BlueBurn. Built on May 18, 2022 using GMDoc.