Click or drag to resize

AudioControllerAddToCategory Method (AudioCategory, AudioItem)

Adds a custom audio item to a category.

Namespace:  (Default Namespace)
Assembly:  AudioToolkit (in AudioToolkit.dll) Version: 8.2.0.0 (8.2.0.0)
Syntax
C#
public static void AddToCategory(
	AudioCategory category,
	AudioItem audioItem
)

Parameters

category
Type: (Default Namespace)AudioCategory
The category.
audioItem
Type: (Default Namespace)AudioItem
The audio item.
Examples
var audioItem = new AudioItem();
audioItem.SubItemPickMode = AudioPickSubItemMode.Sequence;

audioItem.subItems = new AudioSubItem[ 2 ];

audioItem.subItems[ 0 ] = new AudioSubItem();
audioItem.subItems[ 0 ].Clip = audioClip0;
audioItem.subItems[ 0 ].Volume = 0.7f;

audioItem.subItems[ 1 ] = new AudioSubItem();
audioItem.subItems[ 1 ].Clip = audioClip1;
audioItem.subItems[ 1 ].Volume = 0.8f;

AddToCategory( GetCategory( "CustomSFX" ), audioItem );
See Also