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,32 @@
# AddNode
添加资源节点到依赖图中。
## 方法签名
```cpp
void AddNode(ResourceGUID guid, ResourceType type);
```
## 详细描述
将指定资源添加为依赖图中的新节点。如果节点已存在,则不做任何操作。该方法会创建一个带有空依赖关系和被依赖关系列表的新节点,初始引用计数为 0。
## 参数
| 参数 | 类型 | 描述 |
|------|------|------|
| `guid` | `ResourceGUID` | 要添加的资源的全局唯一标识符 |
| `type` | `ResourceType` | 资源类型 |
## 返回值
## 示例
```cpp
ResourceDependencyGraph graph;
graph.AddNode("texture_albedo"_guid, ResourceType::Texture);
graph.AddNode("material_standard"_guid, ResourceType::Material);
```