i'm not sure how exactly the logic behind it works. But a control node in general will never just become smaller than the last size you manually set it to. setting that also seems limited to how small it can currently be. so hide all children and then set the size of the container to (0,0) inside the inspector. then it should be able to become as small as it can.
#My DetailsPanel (Panel Container) node expands to meet new needs, but does not shrink.
30 messages · Page 1 of 1 (latest)
OK, so I should be able to just set its size to 0,0, each time i change out the details and then it should become as small as it needs to be?
I'll attempt it.
i also tried a bit more and the property that actually matters are probably the anchor offsets, which you can manually change when setting the anchor preset to "custom".
OK, setting the size does occasionally reset the size. Strangely it's like only every other time it's called.
Where can I find those anchor points?
under layout it should be the tab above transform.
a.... tab?
bad phrasing, the greyed out "layout mode". but anchors only affect nodes that aren't direct children of containers.
this was originally about your "DetailsPanel" node
oh wait, the layout mode decides what you can use, here it's not limited by a parent container, so you can change anchor presets to custom
(Also, thanks a thousand, for even attempting to help. At the very least, I got something that occasionally works, and might just need to be called a couple more times to be more consistent.)
Oh, Anchor presets
OK. Cool, and suddenly it shows up
Messing with the grow directions doesn't seem to solve the issue (only creating more issues)
What was I supposed to see?
you shouldn't change the grow direction. instead change the anchor offsets, i.e. set them all to 0 if you want the container to shrink as much as possible
Hmm. changing Anchor offsets doesn't seem to do literally anything
how does the node currently look?
i would have prefered inside the editor, where the container is currently hidden, which kinda confuses me. i suspect you only make it visible at speciffic times in game.
but checking if the container acts correctly is best done directly in the editor i wouls say
Yeah, I only make it vvisible on clicking a button
Er, clicking a building
details_panel.visible = true
Anyway, the size thing works
what doesn't make much sense right now is the fact that the anchors all suggest the container starting in the top left corner, but there is clearly something changing that
I appreciate it