C# Class AudioItem, swip3

显示文件 Open project: unit9/swip3 Class Usage Examples

Public Properties

Property 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[],

Public Methods

Method Description
Awake ( ) : void

Private Methods

Method 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 method

public Awake ( ) : void
return void

Property Details

Delay public_oe property

Defers the playback of the audio item for Delay seconds.
public float Delay
return float

DestroyOnLoad public_oe property

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

Loop public_oe property

If enabled the audio item will get looped when played.
public LoopMode Loop
return 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
return 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
return float

Name public_oe property

The unique name of the audio item ( = audioID )
public string Name
return string

SubItemPickMode public_oe property

Determines which AudioSubItem is chosen when playing an AudioItem
public AudioPickSubItemMode SubItemPickMode
return AudioPickSubItemMode

Volume public_oe property

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

audioSource_MaxDistance public_oe property

Overrides the AudioSource MaxDistance value if overrideAudioSourceSettings is enabled.
public float audioSource_MaxDistance
return float

audioSource_MinDistance public_oe property

Overrides the AudioSource MinDistance value if overrideAudioSourceSettings is enabled.
public float audioSource_MinDistance
return 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
return 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
return 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
return float

overrideAudioSourceSettings public_oe property

If enabled you can specify specific AudioSource settings
public bool overrideAudioSourceSettings
return bool

subItems public_oe property

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