> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ILampArray::SetIsEnabled

> ILampArray::SetIsEnabled

# ILampArray::SetIsEnabled

设置当前进程中 ILampArray 的启用状态。

## 语法

```cpp theme={null}
void SetIsEnabled(
    bool isEnabled)
```

### 参数

*isEnabled*\
类型：bool

ILampArray 期望的启用状态。

### 返回值

类型：void

## 备注

禁用时，Lamp 的状态仍可在内部设置，但不会发送到设备。当重新设置为启用时，修改过的 Lamp 状态会刷新到设备。

默认情况下，ILampArrays 始终处于启用状态。

## 要求

**头文件：** LampArray.h

**库：** xgameplatform.lib

**支持的平台：** XBOX One 系列主机和 XBOX Series 主机

## 另请参阅

[光照 API 概览](/build/core-features/common/lighting/gc-lighting-toc)\
[ILampArray::GetIsEnabled](/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_getisenabled)\
[ILampArray](/reference/lighting/lamparray/interfaces/ilamparray/ilamparray)


## Related topics

- [ILampArray::GetIsEnabled](/zh-CN/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_getisenabled.md)
- [ILampArray::SetColor](/zh-CN/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_setcolor.md)
- [ILampArray::SetColorsForIndices](/zh-CN/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_setcolorsforindices.md)
- [ILampArray::SetColorsForScanCodes](/zh-CN/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_setcolorsforscancodes.md)
- [ILampArray::SetBrightnessLevel](/zh-CN/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_setbrightnesslevel.md)
