25 lines
403 B
Markdown
25 lines
403 B
Markdown
|
|
# Material::GetGUID
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
ResourceGUID GetGUID() const override;
|
||
|
|
```
|
||
|
|
|
||
|
|
获取材质的全局唯一标识符。
|
||
|
|
|
||
|
|
**返回:** 资源 GUID
|
||
|
|
|
||
|
|
**线程安全:** ✅
|
||
|
|
|
||
|
|
**复杂度:** O(1)
|
||
|
|
|
||
|
|
**示例:**
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
ResourceHandle<Material> mat = ResourceManager::Get().Load<Material>("materials/pbr.mat");
|
||
|
|
ResourceGUID guid = mat->GetGUID();
|
||
|
|
```
|
||
|
|
|
||
|
|
## 相关文档
|
||
|
|
|
||
|
|
- [Material](material.md) - 返回类总览
|