I thought the bookkeeping of tracking bricks seemed like a lot of extra code when we already had objects with the Breakable tag that we can count. Also it is prone to error if say you add bricks that create more bricks on the screen.
I added this to my LevelManager.cs:
void Start(){
if (Application.loadedLevelName.StartsWith("Level_")) {
InvokeRepeating("CheckForBreakableBricks", 1.0f, 0.2f);
}
}
public void CheckForBreakableBricks(){
var breakableBrick = GameObject.FindGameObjectWithTag("Breakable");
if (breakableBrick == null) {
LoadNextLevel();
}
}