public class PlayRandomClipBehaviour

Inherits MonoBehaviour

Behaviour that just plays a random clip from the given array on the given source / PhysicalBehaviour

Fields

public AudioClip[] Clips

[SkipSerialisation]

Clips to choose from. Cannot be null or empty!


public AudioSource Source

[SkipSerialisation] [NaughtyAttributes.HideIf(nameof(UsePhysicalBehaviourAudioSource))]

Source to play from. Can be null if a PhysicalBehaviour is assigned and UsePhysicalBehaviourAudioSource is true


public PhysicalBehaviour PhysicalBehaviour

[SkipSerialisation] [NaughtyAttributes.ShowIf(nameof(UsePhysicalBehaviourAudioSource))]

PhysicalBehaviour to use for audio playback. Can be null if a Source is assigned and UsePhysicalBehaviourAudioSource is false


public bool PlayOnStart

Should a clip be played on Start?


public bool UsePhysicalBehaviourAudioSource

Should the clip be played from the given PhysicalBehaviour?


Methods

public void Play()

No description provided


Attention!

This member is obsolete and should not be used. It is a remnant from the past.

bi bij bibi