public void IncreaseCoin() {
ย  ย coin += 1;
ย  ย text.SetText(coin.ToString());

ย  ย if(coin % 10 == 0){
ย  ย  ย  Player player = FindObjectOfType<Player>();

ย  ย  ย  if(player != null){
ย  ย  ย  ย  ย player.Upgrade();

ย  ย  ย  }

ย  ย }
}




Assets\๋…ธ์งฑscripts\Game Manager.cs(68,40): error CS0246: The type or namespace name 'Player' could not be found (are you missing a using directive or an ย reference?)

๋ฒ„๊ทธ๊ฐ€ ๋‚˜์˜ด



Player ํด๋ž˜์Šค์—๋Š”

public void Upgrade() {
ย  ย  ย  weaponIndex += 1;

ย  ย  ย  if(weaponIndex >= weapons.Length){ //weapons.Length๋Š” ๊ฐ’์ด 3์ž„(3๊ฐœ ์žˆ์–ด์„œ)

ย  ย  ย  weaponIndex = weapons.Length -1; // 2๋Š” 0 1 2์ด๊ธฐ์— 3๋ฒˆ์งธ ๊ฒƒ

ย  ย  ย  }
ย  ย  }

์ด ์ฝ”๋“œ๊ฐ€ ์žˆ์Œ... ๋ญ๊ฐ€ ๋ฌธ์ œ์ผ๊นŒ?