int Aย =ย int.Parse(InputField_A.GetComponent<Text>().text);
์ด ๊ฐ๋จํ ์ฝ๋์ธ๋ฐย
NullReferenceException: Object reference not set to an instance of an object
๊ฐ ๋ฌ๋ค ใ ใ ใ ใ
์ฌ์๋ ์๋ฌด๊ฒ๋ ์์ด ์ธํํ๋๋ ๋ฒํผ๋ฐ์ ์์
์ธ์คํํฐ์ ๊ฒ์์ค๋ธ์ ํธ๋ค ์ ์ฐ๋๋ ์์ผ์คฌ๋ค ใ
๊ฒ์ด์ผ.. InputField์๋ Text๊ฐ ์๋ฌ๋ ค์๊ณ ์์์ ๋ฌ๋ ค์๋ค. InputField ์ปดํฌ๋ํธ์ UnityEvent๋ก ๊ฐ ๋ณ๋์ ๋ฐ์ํ๋ ์ด๋ฒคํธ ์์ผ๋๊น ๊ทธ๊ฑฐ ์จ๋ผ
๋ด,, ๊ฐ์ ๊ทธ๋๋ก ๋ฐ๋ผํ๋๋ฐ ์ผ์ต
Inputfield๋ ๋ณดํต Getcomponent().Text๋ก ํ์ง ์์์..?
์ด๋ฆ๋ง ์ธํํ๋๊ณ ์ค์ ๋ก๋ GameObject์๋๋คใ
๊ทธ๋ผ GetComponent().textํด๋ฒ๋ฆฌ๋ฉด ๋๊ฒ ๋ค
์ ์ ์ ๋ค๋ฆญ์ด ๋๊ธ์ฐ๋ฉด ์ฌ๋ผ์ง๋๊ฑฐ์ผ;
๋จธ์ผ ๋๋ ์ ๋ค๋ฆญ ์ฌ๋ผ์ก์๋ค