Description
The Repeating
property of the Editor.SoundPlayer
class indicates whether the sound being played is set to repeat continuously. This property is a boolean value, where true
means the sound will loop indefinitely, and false
means it will play only once.
Usage
To use the Repeating
property, you can get or set its value to control the looping behavior of the sound. For example, if you want a sound to loop, set Repeating
to true
before calling the Play
method.
Example
// Create an instance of SoundPlayer
Editor.SoundPlayer soundPlayer = new Editor.SoundPlayer();
// Set the sound to repeat
soundPlayer.Repeating = true;
// Play the sound
soundPlayer.Play();
// Check if the sound is repeating
bool isRepeating = soundPlayer.Repeating;
// Output: true