docs: update resources API docs

This commit is contained in:
2026-03-20 02:35:35 +08:00
parent fd792b7df1
commit ea756c0177
314 changed files with 9439 additions and 1360 deletions

View File

@@ -0,0 +1,31 @@
# GetRefCount
获取资源的引用计数。
## 方法签名
```cpp
Core::uint32 GetRefCount(ResourceGUID guid) const;
```
## 详细描述
返回指定资源的当前引用计数。如果节点不存在,返回 0。
## 参数
| 参数 | 类型 | 描述 |
|------|------|------|
| `guid` | `ResourceGUID` | 目标资源的全局唯一标识符 |
## 返回值
`Core::uint32` - 当前引用计数,如果节点不存在则返回 0
## 示例
```cpp
graph.IncrementRefCount("texture"_guid);
graph.IncrementRefCount("texture"_guid);
uint32 count = graph.GetRefCount("texture"_guid); // 返回 2
```