Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


IAudioGenerator

Factory for instantiating GeneratorInstance to be used internally or from other scripts.
Read time 1 minuteLast updated 10 days ago

Definition

public interface IAudioGenerator : GeneratorInstance.ICapabilities

Remarks

IAudioGenerators do not own any created GeneratorInstance instances, nor should they try to store these for scripting. Instead, the user of the IAudioGenerator should expose the created GeneratorInstance through their own API.
IAudioGenerators are generally implemented on a MonoBehaviour or a ScriptableObject to bind together asset/scene management and audio generation tools with a uniform interface. You can also directly instantiate a GeneratorInstance using a ControlContext purely in code.
If you want to serialize a reference to a IAudioGenerator and have an object picker for asset / component based factories, use the IAudioGenerator.Serializable utility to store/load these references.

Methods

Method

Description

CreateInstanceAsk this interface to create a GeneratorInstance.

Structs

Struct

Description

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

Inheritance