- Home /
I can't seem to get Layout Groups to Work
So, I'm using Unity 2019.2.6 to create a turn based combat system and I can't seem to get my vertical layout group working. I've been following an outdated tutorial series to create a combat system similar to that of final fantasy in terms of UI. I noticed it's outdated because the layout group only has "Child Force Expand" and not "Child Controls size" like in the version I'm using. I've also looked around the internet and found that some verisons of unity also have a third set of checks that mine does not. I learned that checking the "Child Controls Size" box is supposed to allow you to change the scaling based on a Layout Element component in the child. My problem is that as soon as I attach the vertical layout group to my parent panel, all of the elements within it have their anchors set to 0 for min and max X and 1 for min and max Y making them virtually disappear regardless of the layout element on the child/children. I then can't seem to get it back without removing the layout group because access to the rect transform is locked. I'm looking for a result like the one in the video, where I instantiate my buttons through script and don't have to worry about them scaling to the size of the panel. I've tried this in multiple projects and each time the result has been the same. Any advice or work-arounds would be super appreciated.