<!--
{
  "availability" : [
    "Reality Composer Pro: -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "ComputeGraph",
  "identifier" : "/documentation/ComputeGraph/element/index",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Compute Graph"
    ],
    "preciseIdentifier" : "element::index"
  },
  "title" : "element::index"
}
-->

# element::index

Returns the index of the current element.

```
uint element::index()
```

## Return Value

The zero-based index of the element

## Discussion

Use this function to get the element’s position in the element buffer,
which can be useful for creating unique variations or patterns.

> Visual: ![Graph](element__index)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)