Description
The Sounds
property of the Surface
class provides access to the sound data associated with a specific surface material. This data includes various sound effects that are triggered by interactions with the surface, such as footsteps, impacts, and other relevant audio cues.
Usage
To access or modify the sound data for a surface, use the Sounds
property. This property is an instance of Sandbox.Surface.SoundData
, which contains detailed information about the sounds associated with the surface.
Example
// Example of accessing the Sounds property of a Surface object
Surface mySurface = new Surface();
Sandbox.Surface.SoundData soundData = mySurface.Sounds;
// Example of modifying the Sounds property
soundData.FootstepSound = "footstep_concrete";
mySurface.Sounds = soundData;