# IAudioGenerator.Serializable

> A helper struct that allows you to object select and serialize a reference to any Object, MonoBehaviour or ScriptableObject that implements IAudioGenerator.

## Definition

* **Type:** Struct
* **Namespace:** [UnityEngine.Audio](/engine/6000.6/script-reference/unityengine/audio.md)
* **Assembly:** UnityEngine.AudioModule

```csharp
public struct IAudioGenerator.Serializable
```

## Remarks

Interface references are not directly serializable in user scripts if they are implemented on a [Object](/engine/6000.6/script-reference/unityengine/object.md), even if using [SerializeReference](/engine/6000.6/script-reference/unityengine/serializereference.md). This helper struct additionally provides a [PropertyDrawer](/engine/6000.6/script-reference/unityeditor/propertydrawer.md) giving a UI with an object field properly scoped to [IAudioGenerator](/engine/6000.6/script-reference/unityengine/audio/iaudiogenerator.md) objects.

## Constructors

| Constructor                                                                                                                               | Description                                                                                                                                       |
| ----------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Serializable(UnityEngine.Audio.IAudioGenerator)](/engine/6000.6/script-reference/unityengine/audio/iaudiogenerator/serializable/ctor.md) | Construct this serializable struct with an initial [IAudioGenerator](/engine/6000.6/script-reference/unityengine/audio/iaudiogenerator.md) value. |

## Properties

| Property                                                                                                   | Description                                                                                                                     |
| ---------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| [definition](/engine/6000.6/script-reference/unityengine/audio/iaudiogenerator/serializable/definition.md) | Get and Set the serialized object as a [IAudioGenerator](/engine/6000.6/script-reference/unityengine/audio/iaudiogenerator.md). |

## Methods

| Method                                                                                       | Description                                                  |
| -------------------------------------------------------------------------------------------- | ------------------------------------------------------------ |
| [Get](/engine/6000.6/script-reference/unityengine/audio/iaudiogenerator/serializable/get.md) | A type-safe helper method that retrieves the internal value. |
| [Set](/engine/6000.6/script-reference/unityengine/audio/iaudiogenerator/serializable/set.md) | A type-safe helper method that sets the internal value.      |
