C# Class AudioItem, swip3

Afficher le fichier Open project: unit9/swip3 Class Usage Examples

Méthodes publiques

Свойство Type Description
Delay float
DestroyOnLoad bool
Loop LoopMode
MaxInstanceCount int
MinTimeBetweenPlayCalls float
Name string
SubItemPickMode AudioPickSubItemMode
Volume float
audioSource_MaxDistance float
audioSource_MinDistance float
loopSequenceCount int
loopSequenceOverlap float
loopSequenceRandomDelay float
overrideAudioSourceSettings bool
subItems AudioSubItem[],

Méthodes publiques

Méthode Description
Awake ( ) : void

Private Methods

Méthode Description
_Initialize ( AudioCategory, categ ) : void

Initializes the audio item for a certain category. (Internal use only, not required to call).

_IsValidSubItem ( AudioSubItem, item ) : bool
_NormalizeSubItems ( ) : void

Method Details

Awake() public méthode

public Awake ( ) : void
Résultat void

Property Details

Delay public_oe property

Defers the playback of the audio item for Delay seconds.
public float Delay
Résultat float

DestroyOnLoad public_oe property

If disabled, the audio will keep on playing if a new scene is loaded.
public bool DestroyOnLoad
Résultat bool

Loop public_oe property

If enabled the audio item will get looped when played.
public LoopMode Loop
Résultat LoopMode

MaxInstanceCount public_oe property

Assures that the same audio item will not be played more than MaxInstanceCount times simultaneously.
Set to 0 to disable.
public int MaxInstanceCount
Résultat int

MinTimeBetweenPlayCalls public_oe property

Assures that the same audio item will not be played multiple times within this time frame. This is useful if several events triggered at almost the same time want to play the same audio item which can cause unwanted noise artifacts.
public float MinTimeBetweenPlayCalls
Résultat float

Name public_oe property

The unique name of the audio item ( = audioID )
public string Name
Résultat string

SubItemPickMode public_oe property

Determines which AudioSubItem is chosen when playing an AudioItem
public AudioPickSubItemMode SubItemPickMode
Résultat AudioPickSubItemMode

Volume public_oe property

The volume applied to all audio sub-items of this audio item.
public float Volume
Résultat float

audioSource_MaxDistance public_oe property

Overrides the AudioSource MaxDistance value if overrideAudioSourceSettings is enabled.
public float audioSource_MaxDistance
Résultat float

audioSource_MinDistance public_oe property

Overrides the AudioSource MinDistance value if overrideAudioSourceSettings is enabled.
public float audioSource_MinDistance
Résultat float

loopSequenceCount public_oe property

The number of sub-items to be played in the loop modes LoopMode.LoopSequence.
Specify 0 to loop infinitely (This is also the default value). In LoopMode.PlaySequenceAndLoopLast mode as many sub-item will be picked as there are sub-items specified for this audio item.
public int loopSequenceCount
Résultat int

loopSequenceOverlap public_oe property

Specifies a time overlap for the LoopMode.LoopSequence
Positive values mean an overlap, negative values mean a gap between two consequent sub-items in the loop sequence.
public float loopSequenceOverlap
Résultat float

loopSequenceRandomDelay public_oe property

Specifies a random delay for the LoopMode.LoopSequence
A random delay between 0 and this value will be added between two subsequent subitmes in the LoopMode.LoopSequence. Can be combined with loopSequenceOverlap.
public float loopSequenceRandomDelay
Résultat float

overrideAudioSourceSettings public_oe property

If enabled you can specify specific AudioSource settings
public bool overrideAudioSourceSettings
Résultat bool

subItems public_oe property

Define your audio sub-items using the Unity inspector.
public AudioSubItem[], subItems
Résultat AudioSubItem[],