I want to create UI Waves widget from LevelSettings data. (see link)
Some general information I've got from LevelSettings.CurrentDisplayWave and LevelSettings.WaveLengths.Count. But also, would be great to see the Wave progress bar on how many enemies are eliminated in the current wave. How better do it? Should I count enemies in every spawner or there is another way to get Total enemies in the current wave and Remaining enemies?
One more additional question related to LevelSettings.WaveLengths. I have set 6 waves, and somehow, when I start and debug the game, there is an extra wave with waveName: UNNAMED (7 waves in total). But if look at "Levels & Waves" section there are - 6 waves. Is this some kind of bug or what I'm doing wrong? image1 image2 image3
Yes, there is no implicit total of enemies per wave. Only in each spawner (assuming you're talking elimination waves). You'd need to add them up per "spawner wave".
The unnamed wave is created at runtime to not mess things up, due to the way that after a wave has finished spawning, the next wave is always prepared in advance. Nothing to worry about, and you can ignore it.