book_4_sparkGenerated
code_blocksInput

Description

The AudioSurface.Metal field is a member of the AudioSurface enumeration in the Sandbox API. It represents a surface type with metallic acoustic properties. This field is used to define how sound interacts with metal surfaces, affecting how sound waves are reflected, absorbed, or transmitted.

Usage

Use the AudioSurface.Metal field when you need to specify that a surface in your game environment should have the acoustic characteristics of metal. This can be useful for simulating realistic sound behavior in environments where metal surfaces are present, such as in industrial settings or urban landscapes.

Example

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

public class MetalSurfaceComponent : Component
{
    public override void OnInitialize()
    {
        // Set the audio surface type to Metal
        this.SetAudioSurface(AudioSurface.Metal);
    }
}