docs: update resources API docs
This commit is contained in:
33
docs/api/resources/resource-dependency-graph/remove-node.md
Normal file
33
docs/api/resources/resource-dependency-graph/remove-node.md
Normal file
@@ -0,0 +1,33 @@
|
||||
# RemoveNode
|
||||
|
||||
从依赖图中移除资源节点。
|
||||
|
||||
## 方法签名
|
||||
|
||||
```cpp
|
||||
void RemoveNode(ResourceGUID guid);
|
||||
```
|
||||
|
||||
## 详细描述
|
||||
|
||||
从依赖图中移除指定节点。此操作不会自动移除与其他节点之间的依赖关系,这些关系需要在调用此方法前手动清除。该方法直接从内部哈希表中删除节点。
|
||||
|
||||
## 参数
|
||||
|
||||
| 参数 | 类型 | 描述 |
|
||||
|------|------|------|
|
||||
| `guid` | `ResourceGUID` | 要移除的资源的全局唯一标识符 |
|
||||
|
||||
## 返回值
|
||||
|
||||
无
|
||||
|
||||
## 示例
|
||||
|
||||
```cpp
|
||||
graph.RemoveNode("texture_albedo"_guid);
|
||||
```
|
||||
|
||||
## 注意
|
||||
|
||||
移除节点前,建议先使用 `RemoveDependency` 清除该节点的所有依赖关系,以保持依赖图的一致性。
|
||||
Reference in New Issue
Block a user