---
title: "emitter::setGroup"
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/emitter/setgroup
---

# emitter::setGroup

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

## Declaration

```swift
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

Discussion note:  note: Reads from emitter state int activeGroupIndex, if it exists note: Reads from emitter state int sequentialGroupCount, if it exists
