Show / Hide Table of Contents

Class Playlist

The persistent collection of playlist tracks.

Inheritance
System.Object
Playlist
Implements
IAudioClipContainer
ISerializationCallbackReceiver
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Stem
Assembly: Stem.dll
Syntax
[Serializable]
public class Playlist : IAudioClipContainer, ISerializationCallbackReceiver

Properties

| Improve this Doc View Source

AudioClipManagementMode

The audio clip management mode of the playlist.

Declaration
public AudioClipManagementMode AudioClipManagementMode { get; set; }
Property Value
Type Description
AudioClipManagementMode

An enum value.

Remarks

This value is used only if OverrideAudioClipManagement flag is true.

| Improve this Doc View Source

AudioClipUnloadInterval

The audio clip unload interval of the playlist.

Declaration
public float AudioClipUnloadInterval { get; set; }
Property Value
Type Description
System.Single

A time interval in seconds.

Remarks

This value is used only if OverrideAudioClipManagement flag is true and GetAudioClipManagementMode() return value is UnloadUnused.

| Improve this Doc View Source

Bank

The music bank the playlist belongs to.

Declaration
public MusicBank Bank { get; set; }
Property Value
Type Description
MusicBank

A reference to a music bank.

| Improve this Doc View Source

ID

The unique identifier for fast access to the playlist.

Declaration
public int ID { get; }
Property Value
Type Description
System.Int32

A unique identifier value of the playlist.

| Improve this Doc View Source

Name

The name of the playlist. Used for fast search in corresponding music bank.

Declaration
public string Name { get; set; }
Property Value
Type Description
System.String

Name of the playlist.

| Improve this Doc View Source

OverrideAudioClipManagement

The flag indicating whether the playlist should use its own audio clip management mode and unload interval.

Declaration
public bool OverrideAudioClipManagement { get; set; }
Property Value
Type Description
System.Boolean

True, if the playlist has overridden audio clip management and unload interval. False otherwise.

Remarks

This flag defines the behaviour of GetAudioClipManagementMode() and GetAudioClipUnloadInterval() methods.

If true, the playlist will use its own AudioClipManagementMode and AudioClipUnloadInterval properties. Otherwise, PlaylistManagementMode and PlaylistUnloadInterval properties of the containing bank will be used.

| Improve this Doc View Source

Tracks

The collection of playlist tracks.

Declaration
public ReadOnlyCollection<PlaylistTrack> Tracks { get; }
Property Value
Type Description
System.Collections.ObjectModel.ReadOnlyCollection<PlaylistTrack>

A reference to a read-only collection of playlist tracks.

| Improve this Doc View Source

Unfolded

The flag indicating whether the music bank inspector should show advanced settings for the playlist.

Declaration
public bool Unfolded { get; set; }
Property Value
Type Description
System.Boolean

True, if advanced settings are shown. False otherwise.

Remarks

This property is used only by the music bank inspector and does nothing during runtime.

Methods

| Improve this Doc View Source

AddTrack(AudioClip)

Adds a single music track to the playlist.

Declaration
public PlaylistTrack AddTrack(AudioClip clip)
Parameters
Type Name Description
AudioClip clip

A reference to the audio clip with music data.

Returns
Type Description
PlaylistTrack

A reference to a newly created playlist track.

| Improve this Doc View Source

AddTracks(AudioClip[])

Adds multiple music tracks (one per audio clip) to the playlist.

Declaration
public void AddTracks(AudioClip[] clips)
Parameters
Type Name Description
AudioClip[] clips

An array of audio clips with music data.

| Improve this Doc View Source

GetAudioClip(Int32)

Gets the audio clip at the specified index.

Declaration
public AudioClip GetAudioClip(int index)
Parameters
Type Name Description
System.Int32 index

The zero-based index of the audio clip to get.

Returns
Type Description
AudioClip

A reference to an audio clip.

| Improve this Doc View Source

GetAudioClipManagementMode()

Gets the audio clip management mode of the playlist.

Declaration
public AudioClipManagementMode GetAudioClipManagementMode()
Returns
Type Description
AudioClipManagementMode

An enum value.

Remarks

If OverrideAudioClipManagement value is true, AudioClipManagementMode will be used. Otherwise, PlaylistManagementMode value of the containing bank will be used.

| Improve this Doc View Source

GetAudioClipUnloadInterval()

Gets the audio clip unload interval of the playlist.

Declaration
public float GetAudioClipUnloadInterval()
Returns
Type Description
System.Single

The time interval in seconds.

Remarks

This value is only used if GetAudioClipManagementMode() return value is UnloadUnused

If OverrideAudioClipManagement value is true, AudioClipUnloadInterval will be used. Otherwise, PlaylistUnloadInterval value of the containing bank will be used.

| Improve this Doc View Source

GetNumAudioClips()

Gets the number of audio clips in the playlist.

Declaration
public int GetNumAudioClips()
Returns
Type Description
System.Int32

The number of audio clips.

| Improve this Doc View Source

OnAfterDeserialize()

Prepares playlist for runtime use after deserialization.

Declaration
public void OnAfterDeserialize()
Remarks

This method is automatically called by Unity during deserialization process. Don't call it manually.

| Improve this Doc View Source

OnBeforeSerialize()

Prepares playlist for serialization.

Declaration
public void OnBeforeSerialize()
Remarks

This method is automatically called by Unity during serialization process. Don't call it manually.

Implements

IAudioClipContainer
ISerializationCallbackReceiver
  • Improve this Doc
  • View Source
Back to top Generated by DocFX