Description
The SoundOverride
property of the BaseSoundComponent
class is a boolean flag that determines whether the sound settings should be overridden by custom values. When set to true
, it allows the user to specify custom sound parameters such as volume, pitch, and other sound-related properties. This property is part of the SoundOverride
toggle group, which means it can be used to enable or disable a set of related sound properties.
Usage
To use the SoundOverride
property, you need to create an instance of a class that inherits from BaseSoundComponent
. You can then set the SoundOverride
property to true
if you want to apply custom sound settings. This is useful when you need to adjust sound properties dynamically based on game events or user interactions.
Example
// Example of using the SoundOverride property
public class CustomSoundComponent : BaseSoundComponent
{
public CustomSoundComponent()
{
// Enable sound override to apply custom settings
this.SoundOverride = true;
// Set custom sound properties
this.Volume = 0.8f;
this.Pitch = 1.2f;
}
}