The OnSoundReloaded
property is an event handler that is triggered when a sound file is reloaded or recompiled. This can occur during development when changes are made to the sound file, and it needs to be reprocessed by the system.
The OnSoundReloaded
property is an event handler that is triggered when a sound file is reloaded or recompiled. This can occur during development when changes are made to the sound file, and it needs to be reprocessed by the system.
To use the OnSoundReloaded
property, you can assign a method to it that will be called whenever the sound file is reloaded. This is useful for updating any dependent systems or UI elements that need to reflect the changes in the sound file.
// Example of using the OnSoundReloaded property SoundFile soundFile = SoundFile.Load("path/to/soundfile.wav"); // Assign a method to the OnSoundReloaded event soundFile.OnSoundReloaded = () => { // Code to execute when the sound file is reloaded Console.WriteLine("Sound file has been reloaded."); }; // Simulate a reload event soundFile.OnSoundReloaded?.Invoke();