Files
XCSDD/docs/api/resources/resourcehandle/getguid.md
ssdfasd 58a83f445a fix: improve doc link navigation and tree display
- Fix link resolution with proper relative/absolute path handling
- Improve link styling with underline decoration
- Hide leaf nodes from tree, only show directories
- Fix log file path for packaged app
2026-03-19 12:44:08 +08:00

599 B

ResourceHandle::GetGUID

ResourceGUID GetGUID() const

获取资源的全局唯一标识符。如果内部指针为空,则返回一个值为 0 的空 GUID。

参数:

返回: 资源的 ResourceGUID,如果句柄为空则返回 ResourceGUID(0)

复杂度: O(1)

示例:

ResourceHandle<Texture> tex = ResourceManager::Get().Load<Texture>("tex.png");
ResourceGUID guid = tex.GetGUID();
if (guid.IsValid()) {
    printf("GUID: %s\n", guid.ToString().CStr());
}

相关文档