book_4_sparkGenerated
code_blocksInput

Description

The AudioSurface.Glass field is a member of the AudioSurface enumeration in the Sandbox namespace. It represents a surface type with acoustic properties characteristic of glass. This affects how sound interacts with the surface, such as how it reflects or absorbs sound waves.

Usage

Use AudioSurface.Glass when you need to specify that a surface in your game environment should have the acoustic properties of glass. This can be useful for simulating realistic sound behavior in environments where glass surfaces are present, such as windows or glass walls.

Example

// Example of using AudioSurface.Glass in a game object

public class GlassWindow : GameObject
{
    public GlassWindow()
    {
        // Assign the glass audio surface to this object
        this.AudioSurfaceType = AudioSurface.Glass;
    }
}