Skip to main content

resetAllCounters

resetAllCounters(): void;

Reset all instance counters back to zero. Instance counters track how many times a sound has been played, which is used for limiting max instances per sound. Call this to reset all counters, for example when restarting a scene or level.


Example

// Reset all instance counters (e.g., when restarting a level)
soundManager.resetAllCounters();