---
title: "group::elementIndexInGroup"
framework: Compute Graph
role: symbol
role_heading: Function
platforms: [iOS 27.0+, iPadOS 27.0+, macOS 27.0+, tvOS 27.0+, visionOS 27.0+]
path: computegraph/group/elementindexingroup
---

# group::elementIndexInGroup

Returns the index of the current element within its group.

## Declaration

```swift
int group::elementIndexInGroup()
```

## Return Value

Return Value The zero-based index of the current element within its group

## Discussion

Discussion Use this function to identify which particle within the group is being processed, allowing you to create unique behaviors for different particles in the same group. note:
