Description
The Reflections
property of the SoundEvent
class indicates whether the sound should trace reflections, allowing it to be heard indirectly. This can be useful for creating more realistic audio environments where sounds can bounce off surfaces and be heard even if the source is not directly visible.
Note: This property is marked as obsolete and may not be used in future versions. It is also hidden from JSON serialization and the UI.
Usage
To use the Reflections
property, simply set it to true
or false
depending on whether you want the sound to trace reflections. However, since this property is obsolete, consider using alternative methods for handling sound reflections.
Example
// Example of setting the Reflections property
SoundEvent soundEvent = new SoundEvent();
// Enable reflections (not recommended as this property is obsolete)
soundEvent.Reflections = true;
// Check if reflections are enabled
bool isReflectionsEnabled = soundEvent.Reflections;