26 lines
588 B
Markdown
26 lines
588 B
Markdown
|
|
# ResourceDependencyGraph::GetDependencies
|
|||
|
|
|
|||
|
|
```cpp
|
|||
|
|
Containers::Array<ResourceGUID> GetDependencies(ResourceGUID guid) const
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
获取指定资源直接依赖的所有资源列表。不包含传递依赖。
|
|||
|
|
|
|||
|
|
**参数:**
|
|||
|
|
- `guid` - 资源全局唯一标识符
|
|||
|
|
|
|||
|
|
**返回:** 直接依赖的 GUID 数组
|
|||
|
|
|
|||
|
|
**复杂度:** O(k),k 为直接依赖数量
|
|||
|
|
|
|||
|
|
**示例:**
|
|||
|
|
|
|||
|
|
```cpp
|
|||
|
|
auto deps = graph.GetDependencies(materialGuid);
|
|||
|
|
// 返回 Material 直接依赖的资源(Texture、Shader 等)
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## 相关文档
|
|||
|
|
|
|||
|
|
- [ResourceDependencyGraph 总览](dependencygraph.md) - 返回类总览
|