> ## 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.

# GetIndex

> 傳回 Lamp 在其父 LampArray 中的數值索引，讓遊戲可以將 ILampInfo 對應回 ILampArray 方法所使用的索引。

# ILampInfo::GetIndex

傳回指定 Lamp 在 LampArray 中所在的索引。

## 語法

```cpp theme={null}
uint32_t GetIndex(
)
```

### 參數

此方法沒有參數。

### 傳回值

類型：uint32\_t

Lamp 在 LampArray 中的索引。

## 備註

有效的 Lamp 索引範圍為 0 到 [ILampArray::GetLampCount](/zh-TW/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_getlampcount) - 1。

## 需求

**標頭：** LampArray.h

**程式庫：** xgameplatform.lib

**支援的平台：** XBOX One 系列主機和 XBOX Series 主機

## 另請參閱

[照明 API 概觀](/zh-TW/build/core-features/common/lighting/gc-lighting-toc)\
[ILampArray::GetLampInfo](/zh-TW/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_getlampinfo)\
[ILampInfo](/zh-TW/reference/lighting/lamparray/interfaces/ilampinfo/ilampinfo)


## Related topics

- [ILampInfo (介面內容)](/zh-TW/reference/lighting/lamparray/interfaces/ilampinfo/ilampinfo.md)
- [GetMotorIndex](/zh-TW/reference/input/gameinput/interfaces/igameinputforcefeedbackeffect/methods/igameinputforcefeedbackeffect_getmotorindex.md)
- [GetExtraButtonIndexes](/zh-TW/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getextrabuttonindexes.md)
- [GetExtraAxisIndexes](/zh-TW/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getextraaxisindexes.md)
- [HCWebSocketGetHeaderAtIndex](/zh-TW/reference/live/httpclient/httpprovider/functions/hcwebsocketgetheaderatindex.md)
