C# Класс AudioItem, swip3

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
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[],

Открытые методы

Метод Описание
Awake ( ) : void

Приватные методы

Метод Описание
_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

Описание методов

Awake() публичный Метод

public Awake ( ) : void
Результат void

Описание свойств

Delay публичное свойство

Defers the playback of the audio item for Delay seconds.
public float Delay
Результат float

DestroyOnLoad публичное свойство

If disabled, the audio will keep on playing if a new scene is loaded.
public bool DestroyOnLoad
Результат bool

Loop публичное свойство

If enabled the audio item will get looped when played.
public LoopMode Loop
Результат LoopMode

MaxInstanceCount публичное свойство

Assures that the same audio item will not be played more than MaxInstanceCount times simultaneously.
Set to 0 to disable.
public int MaxInstanceCount
Результат int

MinTimeBetweenPlayCalls публичное свойство

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
Результат float

Name публичное свойство

The unique name of the audio item ( = audioID )
public string Name
Результат string

SubItemPickMode публичное свойство

Determines which AudioSubItem is chosen when playing an AudioItem
public AudioPickSubItemMode SubItemPickMode
Результат AudioPickSubItemMode

Volume публичное свойство

The volume applied to all audio sub-items of this audio item.
public float Volume
Результат float

audioSource_MaxDistance публичное свойство

Overrides the AudioSource MaxDistance value if overrideAudioSourceSettings is enabled.
public float audioSource_MaxDistance
Результат float

audioSource_MinDistance публичное свойство

Overrides the AudioSource MinDistance value if overrideAudioSourceSettings is enabled.
public float audioSource_MinDistance
Результат float

loopSequenceCount публичное свойство

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
Результат int

loopSequenceOverlap публичное свойство

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
Результат float

loopSequenceRandomDelay публичное свойство

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
Результат float

overrideAudioSourceSettings публичное свойство

If enabled you can specify specific AudioSource settings
public bool overrideAudioSourceSettings
Результат bool

subItems публичное свойство

Define your audio sub-items using the Unity inspector.
public AudioSubItem[], subItems
Результат AudioSubItem[],