0

I'm instantiating objects/prefabs into a vertical layout group in Unity. each of these objects have a dropdown menus, but my issues is that when I'm expanding the dropdown menu, it does not push the other elements in the layout group down.

What I want these prefabs to do, is that they should be able move the other objects down in order for things to not overlap.

Edit:

How it looks when pressed play in Unity

The script that instantiates the prefab that has the dropdown

1
  • Can you add a picture of it? Also, the code which instantiates and pushes into the dropdown layout. Commented May 6, 2022 at 8:31

1 Answer 1

0

Generally, you could add a component called ContentSizeFitter to the parent game object, and set vertical fit to min size. All the child element should add a LayoutElement with a specific min size

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.