A function defined in BBMOD_ResourceManager.gml
load(_path[, _sha1[, _onLoad]])
Asynchronnously loads a resource from a file or retrieves a reference to it, if it is already loaded.
||The path to the resource.|
||Expected SHA1 of the file. If the actual one does not match with this, then the resource will not be loaded. Use
||A function to execute when the resource is loaded or if an error occurs while loading it. It must take the error as the first argument and the resource as the second argument. If no error occurs, then
Struct.BBMOD_Resource The resource or
Currently supported files formats are
*.bbmod for BBMOD_Model,
*.bbanim for BBMOD_Animation,
*.bbmat for BBMOD_Material and
*.jpg/jpeg for BBMOD_Sprite. Since version 3.17.0, this can also automatically load model's materials from BBMAT files when BBMOD_ResourceManager.LoadMaterials is set to
true. If you're loading for example a model called
Tree.bbmod, which has materials "Trunk" and "Leaves", it first tries to load them from files
Tree_Leaves.bbmat. If these files don't exist, then it tries to load them without the
Tree_ prefix, i.e.
Leaves.bbmat. If even these are not present, then the material slots are left with the default values. If the BBMAT files do exist, then the
_onLoad callback is called after all of them are loaded!
Copyright © 2023, BlueBurn. Built on September 11, 2023 using GMDoc.