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

# emitter::setGroup

Sets the element group(s) for spawn requests from this emitter.

```
void emitter::setGroup(int activeGroup, int sequentialGroups)
```

## Parameters

`activeGroup`

Index of the first active group

`sequentialGroups`

Number of groups to spawn. Only used when the
emitter’s groupMode is `sequential`.

## Discussion> Visual: ![Graph](emitter__setGroup)

> Note: Reads from emitter state `int activeGroupIndex`, if it exists

> Note: Reads from emitter state `int sequentialGroupCount`, if it exists

---

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)