static void GetActive( List<SoundHandle> handles )

robot_2Generated
code_blocksInput

Description

The GetActive method is a static method of the SoundHandle class in the Sandbox namespace. It is used to retrieve a list of currently active sound handles. This method populates the provided list with sound handles that are currently active in the scene.

Usage

To use the GetActive method, you need to pass a List<SoundHandle> as a parameter. This list will be filled with the active sound handles when the method is called. Ensure that the list is initialized before passing it to the method.

Example

// Example usage of SoundHandle.GetActive
List<SoundHandle> activeSounds = new List<SoundHandle>();
SoundHandle.GetActive(activeSounds);

// Now activeSounds contains all currently active sound handles
foreach (var sound in activeSounds)
{
    // You can now manipulate each active sound handle
    sound.Volume = 0.5f; // Set volume to 50%
}