docs: update resources API docs
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
# RemoveDependency
|
||||
|
||||
移除资源之间的依赖关系。
|
||||
|
||||
## 方法签名
|
||||
|
||||
```cpp
|
||||
void RemoveDependency(ResourceGUID owner, ResourceGUID dependency);
|
||||
```
|
||||
|
||||
## 详细描述
|
||||
|
||||
移除两个节点之间的依赖关系。该方法会同时更新两个节点的关联数组:
|
||||
- 从 `owner` 的 `dependencies` 列表中移除 `dependency`
|
||||
- 从 `dependency` 的 `dependents` 列表中移除 `owner`
|
||||
|
||||
如果任一节点不存在或依赖关系不存在,则不做任何操作。
|
||||
|
||||
## 参数
|
||||
|
||||
| 参数 | 类型 | 描述 |
|
||||
|------|------|------|
|
||||
| `owner` | `ResourceGUID` | 依赖方的全局唯一标识符 |
|
||||
| `dependency` | `ResourceGUID` | 被依赖项的全局唯一标识符 |
|
||||
|
||||
## 返回值
|
||||
|
||||
无
|
||||
|
||||
## 示例
|
||||
|
||||
```cpp
|
||||
graph.RemoveDependency("material"_guid, "texture"_guid);
|
||||
```
|
||||
Reference in New Issue
Block a user