hi…
I searched a lot on the internet and found many answers , but noting work for me
please how can fix this problem …
I mad a prefab contain
Panel and in the panel there is an image and text
by using this code I clone the button
RectTransform _content;
_content = Instantiate( CloneButton , new Vector2(0,0) ,transform.rotation ) as RectTransform;
_content.parent = transform;
_content.anchoredPosition = new Vector2 (0,-(ContentHeight + ContentSpace) * currentCount + Start_PosY );
_content.name = "Button";
_content.localScale = new Vector2(1f,1f);
_content.GetComponent<Button>().onClick.AddListener(() => ButtonPressed_ImageVideo(info) );
the button will clone and if I press on it , will work and every things OK except ,
- the image show good , but the text show out of the UI rectangle
- List item
- no color for the panel and the button ( just gray ) and if I at run time , in the editor change the color , nothing will happen
what should I do ?