A์Šคํฌ๋ฆฝํŠธ


static private GameManager _instance = null;


ย  ย  void Awake()

ย  ย  {

ย  ย  ย  ย  _instance = this;

ย  ย  }


ย  ย  static public GameManager GetInstance()

ย  ย  {

ย  ย  ย  ย  return _instance;


ย  ย  }



B์Šคํฌ๋ฆฝํŠธ


GameManager gm;


Awake()

{

gm = GameManager.GetInstance();

}





Awake ์‹คํ–‰ ์ˆœ์„œ๊ฐ€ ๋ณด์žฅ๋˜์ง€ ์•Š๋Š”๋‹ค๊ณ  ๋“ค์—ˆ๋Š”๋ฐ


๊ทธ๋Ÿผ B์Šคํฌ๋ฆฝํŠธ์—์„œ ์ €๊ฑฐ Start์— ์จ์•ผ ์•ˆ์ „ํ•˜๋ ค๋‚˜??ย 


A์—์„œ this๊ฐ€ ๋จผ์ € ๋“ค์–ด๊ฐ€๋ฆฌ๋ž€ ๋ณด์žฅ์ด ์—†์œผ๋‹ˆ๊นŒ?