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:
29
docs/api/resources/resourcemanager/find.md
Normal file
29
docs/api/resources/resourcemanager/find.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# ResourceManager::Find
|
||||
|
||||
```cpp
|
||||
IResource* Find(const Containers::String& path)
|
||||
IResource* Find(ResourceGUID guid)
|
||||
```
|
||||
|
||||
在资源缓存中查找资源。返回裸指针,不增加引用计数。
|
||||
|
||||
**参数:**
|
||||
- `path` - 资源路径
|
||||
- `guid` - 资源全局唯一标识符
|
||||
|
||||
**返回:** 找到则返回资源指针,否则返回 `nullptr`
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
IResource* res = ResourceManager::Get().Find("textures/player.png");
|
||||
if (res && res->IsValid()) {
|
||||
Texture* tex = static_cast<Texture*>(res);
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [ResourceManager 总览](resourcemanager.md) - 返回类总览
|
||||
Reference in New Issue
Block a user