how to convert a dynamic playerpref to a dynamic int variable?
hi my question might be not very clear but by dynamic i mean a string name that changes according to the level we are in the game.Basically in my game i needed a method to check if a player have already played a level if yes then he dont gets score for playing same level again.I have a function that determines the "currentlevel" and the value is placed in string name of the playerpref which works as a bool to check whether a level have been played or no.The problem is i want to get rid of playerprefs to make it more secure. So how can i make a dynamic int variable name?plz help
PlayerPrefs.SetInt ("Level" + CurrentLevel.ToString () + "_win", 1 ) ;
this is my 'dynamic' playerpref and i think i need a variable name that changes the way the string changes and can be saved in a file fo each level. How can i do this or any better suggestions?
Your answer
![](https://koobas.hobune.stream/wayback/20220612092907im_/https://answers.unity.com/themes/thub/images/avi.jpg)