Show / Hide Table of Contents

Class DaggerfallAudioSource

Load sound effects from Daggerfall into a normal AudioSource. This component loads clips procedurally in editor and at runtime. Can preview clips by index, ID, or enum directly from editor window.

Inheritance
Object
Object
Component
Behaviour
MonoBehaviour
DaggerfallAudioSource
Namespace: DaggerfallWorkshop
Assembly: Assembly-CSharp.dll
Syntax
[RequireComponent(typeof(AudioSource))]
public class DaggerfallAudioSource : MonoBehaviour

Fields

| Improve this Doc View Source

Preset

Declaration
public AudioPresets Preset
Field Value
Type Description
AudioPresets
| Improve this Doc View Source

SoundIndex

Declaration
public int SoundIndex
Field Value
Type Description
Int32

Properties

| Improve this Doc View Source

AudioSource

Gets peer AudioSource component.

Declaration
public AudioSource AudioSource { get; }
Property Value
Type Description
AudioSource
| Improve this Doc View Source

IsReady

Declaration
public bool IsReady { get; }
Property Value
Type Description
Boolean

Methods

| Improve this Doc View Source

GetAudioClip(Int32)

Get AudioClip from sound index.

Declaration
public AudioClip GetAudioClip(int soundIndex)
Parameters
Type Name Description
Int32 soundIndex
Returns
Type Description
AudioClip
| Improve this Doc View Source

IsPlaying()

Check if AudioSource is playing a clip.

Declaration
public bool IsPlaying()
Returns
Type Description
Boolean
| Improve this Doc View Source

PlayClipAtPoint(SoundClips, Vector3, Single)

Plays sound clip once at a specified position without changing clip on AudioSource.

Declaration
public void PlayClipAtPoint(SoundClips soundClip, Vector3 position, float volumeScale = 1F)
Parameters
Type Name Description
SoundClips soundClip
Vector3 position
Single volumeScale
| Improve this Doc View Source

PlayClipAtPoint(Int32, Vector3, Single)

Plays sound clip once at a specified position without changing clip on AudioSource.

Declaration
public void PlayClipAtPoint(int soundIndex, Vector3 position, float volumeScale = 1F)
Parameters
Type Name Description
Int32 soundIndex
Vector3 position
Single volumeScale
| Improve this Doc View Source

PlayOneShot(SoundClips, Single, Single)

Plays sound clip once without changing clip on AudioSource.

Declaration
public void PlayOneShot(SoundClips soundClip, float spatialBlend = 1F, float volumeScale = 1F)
Parameters
Type Name Description
SoundClips soundClip
Single spatialBlend
Single volumeScale
| Improve this Doc View Source

PlayOneShot(Int32, Single, Single)

Plays sound index once without changing clip on AudioSource.

Declaration
public void PlayOneShot(int soundIndex, float spatialBlend = 1F, float volumeScale = 1F)
Parameters
Type Name Description
Int32 soundIndex
Single spatialBlend
Single volumeScale
| Improve this Doc View Source

PlayOneShot(UInt32, Single, Single)

Plays sound ID once without changing clip on AudioSource.

Declaration
public void PlayOneShot(uint soundID, float spatialBlend = 1F, float volumeScale = 1F)
Parameters
Type Name Description
UInt32 soundID
Single spatialBlend
Single volumeScale
| Improve this Doc View Source

SetSound(SoundClips, AudioPresets, Single)

Quick set from clip name.

Declaration
public void SetSound(SoundClips soundClip, AudioPresets preset = AudioPresets.OnDemand, float spatialBlend = 1F)
Parameters
Type Name Description
SoundClips soundClip
AudioPresets preset
Single spatialBlend
| Improve this Doc View Source

SetSound(Int32, AudioPresets, Single)

Quick set from index.

Declaration
public void SetSound(int soundIndex, AudioPresets preset = AudioPresets.OnDemand, float spatialBlend = 1F)
Parameters
Type Name Description
Int32 soundIndex
AudioPresets preset
Single spatialBlend
| Improve this Doc View Source

SetSound(UInt32, AudioPresets, Single)

Quick set from ID.

Declaration
public void SetSound(uint soundID, AudioPresets preset = AudioPresets.OnDemand, float spatialBlend = 1F)
Parameters
Type Name Description
UInt32 soundID
AudioPresets preset
Single spatialBlend

Extension Methods

MBExtensions.Invoke(MonoBehaviour, Action, Single)
MBExtensions.Invoke<T>(MonoBehaviour, Action<T>, T, Single)
MBExtensions.Invoke<T1, T2>(MonoBehaviour, Action<T1, T2>, T1, T2, Single)
MBExtensions.Invoke<T1, T2, T3>(MonoBehaviour, Action<T1, T2, T3>, T1, T2, T3, Single)
MBExtensions.Invoke<T1, T2, T3, T4>(MonoBehaviour, Action<T1, T2, T3, T4>, T1, T2, T3, T4, Single)
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX