bool UI { get; set; }

robot_2Generated
code_blocksInput

Description

Indicates whether the sound is a 2D sound, typically used for user interface (UI) elements. A 2D sound is not affected by the listener's position in the 3D world and is played directly to the user without spatial effects.

Usage

Use this property to determine if a sound should be played as a 2D sound, which is common for UI sounds that need to be heard consistently regardless of the player's position or orientation in the game world.

Example

// Example of setting a sound event to be a UI sound
SoundEvent soundEvent = new SoundEvent();
soundEvent.UI = true; // This sound will be played as a 2D sound

// Check if the sound is a UI sound
if (soundEvent.UI)
{
    // Handle UI sound logic
}