- Fix link resolution with proper relative/absolute path handling - Improve link styling with underline decoration - Hide leaf nodes from tree, only show directories - Fix log file path for packaged app
939 B
939 B
ResourceManager::LoadGroup
template<typename T>
void LoadGroup(const Containers::Array<Containers::String>& paths,
std::function<void(ResourceHandle<T>)> callback)
批量异步加载同类资源。为路径数组中的每个路径提交一个异步加载请求,所有加载完成时通过回调通知。
参数:
paths- 资源路径数组callback- 每个资源加载完成时的回调
返回: 无
复杂度: O(k),k 为路径数量(每个加载为 O(n))
示例:
Containers::Array<Containers::String> texPaths = {
"textures/a.png", "textures/b.png", "textures/c.png"
};
ResourceManager::Get().LoadGroup<Texture>(texPaths,
[](ResourceHandle<Texture> tex) {
if (tex.IsValid()) {
printf("Loaded: %s\n", tex->GetPath().CStr());
}
});
相关文档
- ResourceManager 总览 - 返回类总览