AudioResourceLibraryComponent

A Component that manages audio resources as a key-value dictionary for organized audio playback.

This component provides centralized storage and access to AudioResource instances using named keys. AudioResources can be added, removed, and retrieved using named keys, enabling:

  • Structured audio resource management.

  • Dynamic runtime audio switching.

  • Timeline integration for sequenced playback.

Constructors

Link copied to clipboard
constructor()

Constructs an empty AudioResourceLibraryComponent.

Functions

Link copied to clipboard
fun add(name: String, resource: AudioAsset): Boolean

Adds an AudioAsset to the AudioResourceLibraryComponent using a specified name.

Link copied to clipboard
Link copied to clipboard
open override fun clone(): Component

Creates and returns a copy of this Component instance.

Link copied to clipboard
fun contains(name: String): Boolean

Checks if the AudioResourceLibraryComponent contains an AudioResource with the given name.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
fun get(name: String): AudioResource?

Gets an AudioResource from the AudioResourceLibraryComponent using a specified name.

Link copied to clipboard
Link copied to clipboard
fun getAllNames(): List<String>

Gets the names of all AudioResources within the AudioResourceLibraryComponent.

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun remove(name: String)

Removes an AudioResource from the AudioResourceLibraryComponent using a specified name.

Link copied to clipboard
open override fun toString(): String