fix: improve doc link navigation and tree display
- 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
This commit is contained in:
35
docs/api/resources/resourcemanager/loadgroup.md
Normal file
35
docs/api/resources/resourcemanager/loadgroup.md
Normal file
@@ -0,0 +1,35 @@
|
||||
# ResourceManager::LoadGroup
|
||||
|
||||
```cpp
|
||||
template<typename T>
|
||||
void LoadGroup(const Containers::Array<Containers::String>& paths,
|
||||
std::function<void(ResourceHandle<T>)> callback)
|
||||
```
|
||||
|
||||
批量异步加载同类资源。为路径数组中的每个路径提交一个异步加载请求,所有加载完成时通过回调通知。
|
||||
|
||||
**参数:**
|
||||
- `paths` - 资源路径数组
|
||||
- `callback` - 每个资源加载完成时的回调
|
||||
|
||||
**返回:** 无
|
||||
|
||||
**复杂度:** O(k),k 为路径数量(每个加载为 O(n))
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
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 总览](resourcemanager.md) - 返回类总览
|
||||
Reference in New Issue
Block a user