강의

멘토링

커뮤니티

Inflearn Community Q&A

wea88105432's profile image
wea88105432

asked

[MMORPG Game Development Series with C# and Unity] Part3: Unity Engine

UI Automation #1

UI_Button.cs 관련 질문입니다

Written on

·

333

0

UI 자동화부분이 어려워서 다시 돌려보면서 공부하고 있는 중에 하나 궁금한점이 있어 질문드립니다

    private void Start()

    {

        Bind<Button>(typeof(Buttons));

        Bind<Text>(typeof(Texts));

    }

Start 함수에서 Bind(typeof(Buttons)); Bind(typeof(Texts)); 로 호출하지 않고

Bind<Button>, Bind<Text>로 호출한 이유는 Dictionary 형태의 변수를 만들어 관리하기 편하게 하기 위함으로 봐도 될까요?

unityC#

Answer 2

1

Rookiss님의 프로필 이미지
Rookiss
Instructor

지정한 enum 타입을  무엇(어떤 Component)과 매핑할지 알려주는 부분입니다.
enum 이름이 Buttons라고 해서, 실제 UI.Button을 찾아 달라는 의미인지는 모르기 때문이죠.

0

astrape님의 프로필 이미지
astrape
Questioner

Util.FindChild에서 매핑할 component를 찾기위해서 사용하는거였군요!! 이해가 되었습니다 ㅎㅎ 감사합니다

다른 강의들에서는 제네릭 형태를 사용하는 것을 잘 보지못했던것 같은데

제네릭 형식을 비롯해서 실무에서 사용할것 같은 내용으로 강의해주셔서 어렵지만 재밌게 듣고있습니다 ㅎㅎ

wea88105432's profile image
wea88105432

asked

Ask a question