Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
2
Question by $$anonymous$$ · Jan 03, 2017 at 05:44 PM · uilayoutalignmentgroupelements

Vertical Layout Group, how to set different child aligments

Hello everyone! Im making a simple tooltip that expands as content grows in it and it works like a charm, child alignment is set to middle to center, but how can i have Lower Left alignment for some childs and middle for another?

As you can see from picture Name and description needs to have middle alignment and parameters need to have lower left alignment, so how can i set different aligments in a vertical layout group?

alt text

tooltip.jpg (294.1 kB)
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Hellium · Jan 03, 2017 at 05:49 PM

I would manage the alignment inside the items, not through the layout.

  1. In the vertical layout, set the alignment to middle center, and expand width

  2. Each layout item is an empty filling as much place as possible

  3. Inside each item, play with the anchor points to align the sub-elements to the left / the center / the right

Comment
Add comment · Show 10 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image $$anonymous$$ · Jan 03, 2017 at 06:20 PM 0
Share

This works,but if i set child force expand width, it will maximize width of the main box. alt text

tooltip-копия.jpg (502.0 kB)
avatar image Hellium $$anonymous$$ · Jan 03, 2017 at 07:51 PM 0
Share

$$anonymous$$mh, which element do you want to align to the left ? I don't quite understand your hierarchy

avatar image $$anonymous$$ Hellium · Jan 03, 2017 at 08:14 PM 0
Share

I will show it visually:

alt text

tooltip-копия.jpg (480.0 kB)
Show more comments
Show more comments
avatar image Hellium $$anonymous$$ · Jan 03, 2017 at 08:45 PM 0
Share

Could you share a Unity package with your "dialogue box" as a prefab so I can take a look at it ?

avatar image $$anonymous$$ Hellium · Jan 04, 2017 at 08:19 AM 0
Share

Sure, you can look at it.link text

tooltip.zip (423.6 kB)
avatar image Hellium · Jan 04, 2017 at 08:36 AM 0
Share

Ok, I see you have Vertical Layout groups nearly everywhere ^^

Here is a solution I found. I don't know if it will fit your needs :

  1. Tooltip_Skills [ContentSizeFitter] : Change Horizontal fit to Preffered size

  2. Parameters : Add a [LayoutElement] component and check the Flexible Width with a value set to 1

I guess you will not be able to do what you want without making the box fill your Tooltip_Skill image

avatar image $$anonymous$$ Hellium · Jan 04, 2017 at 09:56 AM 0
Share

Im using this layout to set max width: http://hilllo.com/limit-max-width-of-a-layout-component-in-unity/

So when it its small when there is not too much content, but if its too big, it wont expand forever :D

avatar image hilllo $$anonymous$$ · Apr 12, 2017 at 06:49 PM 0
Share

Wow, not related to your question but thanks for visiting my blog! :D

avatar image
0

Answer by samra2494 · Mar 13, 2019 at 09:18 AM

just do this setting in your tooltip_Skill Panel.. the components you have added to this panel is correct, only you need to do these settings to your panelalt text


a.png (37.8 kB)
Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

92 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Create placeholders in grid layout group? 1 Answer

How can I make Horizontal Layout Group starts from right to left? 4 Answers

Content size fitter alignment issue 1 Answer

UI Layout Moves after you save or touch it in the Editor 0 Answers

Can't animate UI element whose values are controlled by a layout group 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges