ドキュメント

Unity Engine

Unity Engine

IAudioEffect

Factory for instantiating EffectInstance to be used internally or from other scripts.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

public interface IAudioEffect : EffectInstance.ICapabilities

Remarks

Implement IAudioEffect on a MonoBehaviour and add the component to the same GameObject as an AudioSource to process the audio source's signal with the effect. The audio source discovers the component automatically, calls IAudioEffect.CreateInstance, and owns the returned EffectInstance. Use AudioSource.GetEffectInstance to interact with the instance while it is playing.
IAudioEffects do not own any created EffectInstance instances, and they don't try to store these for scripting.
If you want to serialize a reference to a IAudioEffect, use the IAudioEffect.Serializable utility to store/load these references.

Methods

Method

Description

CreateInstanceAsk this interface to create an EffectInstance.

Structs

Struct

Description

IAudioEffect.SerializableA helper struct that allows you to serialize a reference to any Object, MonoBehaviour or ScriptableObject that implements IAudioEffect.