# generator

> The default IAudioGenerator to play next.

## Definition

* **Type:** Property
* **Namespace:** [UnityEngine](/engine/6000.7/script-reference/unityengine.md)
* **Assembly:** UnityEngine.AudioModule

```csharp
public IAudioGenerator generator { get; set; }
```

### Remarks

When you call [AudioSource.Play](/engine/6000.7/script-reference/unityengine/audiosource/play.md), the [AudioSource](/engine/6000.7/script-reference/unityengine/audiosource.md) will instantiate a `Generator` from the `CreateRuntime` function and render samples from it as the audio system mixes. The instantiated `Generator` instance will be assigned to [\_generatorInstance](/engine/6000.7/script-reference/unityengine/audiosource/generatorinstance.md) for runtime scripting control while it is playing.
