The Volume
property of the BaseSoundComponent
class represents the volume level of the sound being played by this component. It is a floating-point value that ranges from 0.0 to 1.0, where 0.0 is completely silent and 1.0 is the maximum volume.
The Volume
property of the BaseSoundComponent
class represents the volume level of the sound being played by this component. It is a floating-point value that ranges from 0.0 to 1.0, where 0.0 is completely silent and 1.0 is the maximum volume.
To adjust the volume of a sound in a BaseSoundComponent
, set the Volume
property to a value between 0.0 and 1.0. This can be done programmatically or through the editor if the component is exposed in a user interface.
// Example of setting the Volume property BaseSoundComponent soundComponent = new BaseSoundComponent(); soundComponent.Volume = 0.75f; // Set the volume to 75% of the maximum level