0

I've build simple chat UI where instead of text input you have options for my game. And it works. Kind of. The problem is when adding elements instead of just shrinking already existing elements to keep spacing and padding HorizontalLayout additionaly expands itself.

With 1 Element

With 2 Element

Sidebar's width with 1 element

Sidebar's width with 2 elements

Chat UI Inspector

Main Section Inspector

Sidebar Inspector

Responses Box Inspector

i.stack.imgur.com/AQSLW.png (Can't upload > 8 links)

As you can see width of sidebar decreased on the second screenshot.

The question: How do i keep HorizontalLayout's width without disabling paddings and spacing?

I have already tried: Messing around with other layout elements, but it seems that problem exists only when paddings and/or spacings are set.

everr
  • 28
  • 5
  • Tbh it is extremely difficult to see the difference.. maybe it would help if you select the according object and show us the values in the Inspector.. – derHugo Jan 10 '23 at 07:58
  • @derHugo updated question with sidebar's width screenshots – everr Jan 10 '23 at 08:28
  • What's your `Horizontal Layout Group's` setting? Have you tried to disable the `Control Child Size` of in the setting? – Willard Peng Jan 10 '23 at 09:19
  • @WillardPeng when i disable them it expands even more in directions where it shoud not – everr Jan 10 '23 at 10:01
  • @everr Could you show the Inspector setting of `ChatUI` ? What are the components on it? And the `Layout Element` setting on the `Sidebar`. – Willard Peng Jan 10 '23 at 10:12
  • @WillardPeng updated question with more screenshots of different elements. – everr Jan 10 '23 at 10:21

0 Answers0