Version: Unity 6.7 Beta (6000.7)
LanguageEnglish
  • C#

EffectInstance

struct in UnityEngine.Audio

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

A ProcessorInstance that processes audio data.

An EffectInstance can be defined through implementing the IControl<T0> and IRealtime interfaces, which defines the control and real-time thread behaviour respectively.

To use an effect in a scene, for example with an AudioSource, expose it through an IAudioEffect component attached to the same GameObject as the AudioSource. The AudioSource auto-discovers IAudioEffect components on its GameObject and instantiates and manages their EffectInstances for you.

It is also possible to create your own effects through code using a ControlContext. Interacting with an instantiated effect depends on ownership of the EffectInstance: If the effect has been created from an AudioSource, you would interact with it through the instance obtained from AudioSource.GetEffectInstance.

Public Methods

Method Description
Configure Manually reconfigure this EffectInstance with the given AudioConfiguration.
Equals Checks if this instance equals another.
GetHashCode Retrieves a hash code based on this instance.

Operators

Operator Description
operator != Checks if two instances are not equal.
operator == Checks if two instances are equal.
ProcessorInstance Convert this EffectInstance to its more general ProcessorInstance representation.