27 lines
414 B
Markdown
27 lines
414 B
Markdown
|
|
# Material::GetTexture
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
ResourceHandle<Texture> GetTexture(const Containers::String& name) const;
|
||
|
|
```
|
||
|
|
|
||
|
|
获取纹理属性句柄。
|
||
|
|
|
||
|
|
**参数:**
|
||
|
|
- `name` - 属性名称
|
||
|
|
|
||
|
|
**返回:** 纹理资源句柄
|
||
|
|
|
||
|
|
**线程安全:** ✅
|
||
|
|
|
||
|
|
**复杂度:** O(1)
|
||
|
|
|
||
|
|
**示例:**
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
ResourceHandle<Texture> albedoMap = mat->GetTexture("albedoMap");
|
||
|
|
```
|
||
|
|
|
||
|
|
## 相关文档
|
||
|
|
|
||
|
|
- [Material](material.md) - 返回类总览
|