Hello! I use Horizontal Layout Group component from New UI to center buttons in scene.
By default there are 2 buttons: Dropbox - Error - Simplify your life
But one may be hidden and another one must be centered: Dropbox - Error - Simplify your life
The problem is that I can’t get this working without making hidden button inactive. I use Canvas Group element to control visibility everywhere in the scene and when I set alpha to 0 button remains in it’s position. Is there any way to enable New UI components take Canvas Group alpha into account when aligning ?
My setup is as follows:
Panel (Horizontal Layout Group; Content Size Fitter, Horizontal Fit=Min Size)
- Button 1 (Layout Element, Min Width=some unequal width in pixels)
- Button 2 (same as Button 1)
That setup I’ve taken from best of live training, from Recorded Video Training: Shop UI with Runtime Scroll Lists - Unity Learn