How to let player know they have completed a level

I have a game where all levels are unlocked, I need to let the user know that they have completed a level, they click on a button to switch to a level
my game has 15 levels so I have this script

The for loop is to check all the levels to see which levels have not been completed, if the level is not completed then the color is going to equal the color of a hidden button which is red
121306-bandicam-2018-07-21-22-40-50-442.jpg

The thing is…the system I created works like a regular unlock and lock system
(play level 1 to unlock 2, play level 2 to unlock 3 etc.)

so let’s say I play level 7 (remember all levels are unlocked)
it will leave the buttons after 7 (8 - 15) the level not played color which is red, which I want it to do, but the buttons before 7 (1 - 6) will be there normal color, indicating that the player has played levels 1 through 6
but they haven’t.
I need a fool proof way of informing a user that they have completed a level, even if they go to level 7 with out playing levels 1 - 6 it will only show hat they have played level 6 and not the levels before 6 as well.

P.S. the PlayerPrefs.DeleteKey("LevelIsNotCompleted"); is so before I export my APK I delete any saved data I might have stored during the development process in the unity editor.
@UnityCoach

@AnyoneElseThatCanHelp

Just do a playerprefs for each level. Extend your key name with the level number. Use Set and GetInt to set 0 or 1 depending on the state of the level, not played or finished. This way, each LevelButton gets it’s own state, initialized with 0 as not played yet.

Hi,

If you have no more than 32 levels, you can store the completion as a bit array.
In other words, a 32 bit integer of which every bit is used to store a boolean value.

bool GetLevelCompleted (int level)
{
    return PlayerPrefs.GetInt("LevelsCompleted") & (1 << level) != 0;
}

void SetLevelCompleted (int level)
{
    PlayerPrefs.SetInt("LevelsCompleted", PlayerPrefs.GetInt("LevelsCompleted") | (1 << level));
}

void Init ()
{
    for (int i = 0 ; i < buttons.Length ; i++)
        if (GetLevelCompleted(i))
            buttons*.colors = grapfic.colors;*

}
Unless you really want to place the buttons manually, I would also use Layout components (Vertical, Horizontal or Grid), instantiate buttons through scripting, and assign listeners to buttons events automatically too.
Hope this helps.