D
D
Diffins2018-11-07 23:39:29
User interface
Diffins, 2018-11-07 23:39:29

How to adapt the elements = UI layout of the group to different screens?

I have a panel with a Horizontal Layout Group component. I place buttons in it. I can't set anchors for these buttons. As I understand it, this is due to the dependence of the buttons on the layout of the group. I set the anchors to the panel itself as I wanted, but when the resolution is changed, the buttons become huge. Somewhere normal, but somewhere on the floor of the screen. How can I set anchors for these buttons or their size dependency on the parent panel? Or any other solutions?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
F
fstleo, 2018-11-08
@fstleo

Use Layout Element on buttons or play with Child Force Expand in Horizontal Layout Group on panel object

F
freeExec, 2018-11-08
@freeExec

With Layout Group. you have two ways, either the buttons always occupy their % of screen space, or they remain unchanged, and the void between them increases.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question