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, assign a method to it that matches the System.Action
delegate signature. This method will be called whenever the sound file is reloaded.
// Example of using the OnSoundReloaded property SoundFile soundFile = new SoundFile(); // 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 reloading the sound file soundFile.Reload(); // This would internally trigger the OnSoundReloaded event