2026-03-20 02:35:35 +08:00
|
|
|
# TextureImportSettings::SetSRGB / GetSRGB
|
|
|
|
|
|
|
|
|
|
```cpp
|
|
|
|
|
void SetSRGB(bool srgb);
|
|
|
|
|
bool GetSRGB() const;
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
设置或获取 sRGB 颜色空间标记。
|
|
|
|
|
|
|
|
|
|
**参数:**
|
|
|
|
|
- `srgb` - 是否使用 sRGB 颜色空间
|
|
|
|
|
|
|
|
|
|
**返回:** `bool` / `void`
|
|
|
|
|
|
|
|
|
|
**线程安全:** ✅
|
|
|
|
|
|
|
|
|
|
**示例:**
|
|
|
|
|
|
|
|
|
|
```cpp
|
|
|
|
|
TextureImportSettings settings;
|
|
|
|
|
settings.SetSRGB(true);
|
|
|
|
|
bool srgb = settings.GetSRGB(); // true
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## 相关文档
|
|
|
|
|
|
2026-03-26 02:41:00 +08:00
|
|
|
- [TextureImportSettings 总览](texture-import-settings.md) - 返回类总览
|