์ ๋์์ ๋ณด๋ฉด
Canvas ์ ๋ ๋ฒจ๋งค๋์ ธ ์คํฌ๋ฆฝํธ ๋ฃ์ด ๋๊ณ ๋ฒํผ 3๊ฐ ๋ง๋ค์ด์ ๊ฑฐ๊ธฐ์ ์๋ ๋ฉํธ ๊ฐ๊ฐ ๋ฃ์ด๋์ํ
ํ๋ ์ดํด๋ณด๋ฉด
๋ ๋ฒจ1๋ง ํ์ฑํ ๋์ด์๊ณ ๋๋จธ์ง๋ ๋ฒํผ ๋นํ์ฑํ๊ฐ ๋์ด ์์ด์ผ ํ๋๋ฐ
์ ๋๋ ๋ฒํผ์ด 3๊ฐ๋ค ์ ๋ถ ํ์ฑํ ๋์์๊น์
public class StageManager : MonoBehaviour
{
int StageUnlocked;
public Button[] buttons;
void Start()
{
StageUnlocked = PlayerPrefs.GetInt("Stageinlocked",1);
for (int i = 0; i < buttons.Length; i++)
{
buttons[i].interactable = false;
}
for (int i = 0; i< StageUnlocked; i++)
{
buttons[i].interactable = true;
}
}
public void LoadStage(int StageIndex)
{
SceneManager.LoadScene(StageIndex);
}
levelr ๋์ Stage๋ก ๋ฐ๊พผ๊ฑฐ ๋ฐ์ ์๋๋ฐ ๋ญ ๋์น๊ฑด์ง ๋ชจ๋ฅด๊ฒ ์ด์.
playerprefs์ stageinlocked์ 3์ด์์ผ๋ก ์ ์ฅํด๋ ผ๊ฑฐ ์๋๊ฒ์ต๋๊น? - dc App
์~~ regedit์์ PlayerPrefs ์ ๋ณด ์ญ์ ํ๋ ํด๊ฒฐ.