How can I save the unlocked characters without global variables for each character

I am making a game, I made a character selection screen, I also made an unlocking system through coins, my question is how could I save the unlocked characters, I know that I could save them through a global variable for each character (in total there are 14), but that would not be ideal because I think it would affect the performance of the game, besides it is only needed for one scene and not for all (in total 7), how could I save all the unlocked characters, and how could I read them later?

As you can see in the video, the unlocked characters are not saved, because they are saved in a scene variable and not in a global variable.

There is no reason to not use a global variable. You could have hundreds of global variables and it wouldn’t impact performance.

But wouldn’t it affect performance, saving and reading several times in storage, wouldn’t there be a way to save them in a single value and then decode it?

If you are only saving when the player saves manually, or when a character is unlocked, it’s not a huge deal. Same with loading, since you’re only going to load it once (at the start of the game, then move the data into global variables) it’s not going to impact performance either, no.