-
Unity Ui Text 얻고 수정
우선 "Unity Ui Canvas"의 방법을 통해서 Canvas를 얻어야 한다.
간단 예제
var canvasobj = GameObject.Find("Canvas1"); var textobj = canvasobj.transform.Find("StateText1"); var uiText = textobj.GetComponent<Text>(); uiText.text = "test111";
'Unity' 카테고리의 다른 글
GameObject OnTrigger (0) 2021.09.15 GameObject 선택 신호 받기 (0) 2021.09.07 ViewportToWorldPoint (0) 2021.08.08 ListBox, ScrollView (0) 2021.07.29 Unity Ui Canvas 얻기 (0) 2021.07.26 Camera 얻기 (0) 2021.07.23 GameObject Visible, Invisible (Show, Hdie) (0) 2021.07.23 Unity - Child GameObject얻기 (0) 2021.07.22