- Home /
NGUI: Dynmaically change following elements postions on collapse/expand of previous element
Hi community,
i've got a question about the new unity ui (introduced with unity 4.6). I'm trying to build a more complex ui window were some elements have additional options that can be folded out and the following elements shoud react on this expand/collapse behaviour.
I'm using Unity 5.3.4f1 and i've got the following problem:
I've got a scroll view with some content elements.
One Content-Element has a Textfield, a Button and an Image that are horizontaly alligned (without Layout Group) and a addional gameobject with the expansion options. This gameobject contains as childs
A ToggleGroup with 3 horizontal aligned toggles (horizontal layout group)
A Label with the corresbonding Dropdown
A second Label with the corresbonding Dropdown
Current Status: When one element is expanded, the the additional informations are shown below the element but the next elements aren't drawn belo the additional options. They are drawn at the same positions as before and are hiding the additional options.
Target: When one of this Content-Elements is expanded, the additional informations are shown below the element and the next Content-Elements following are drawn below the additional options.
Final Target: Save the Content-Elements as Prefab and then fill the scroll view dynamically with this elements by parsing an configuration file or somethink like that.
As I think this problem is very specific and complicated to explain, I've attached test project to this question. So that everyone can have a look on it.
I'm grateful for any hint or support you can provide.
Kind regards, KK3KP