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
0
Question by RyanAchtenSoma · Sep 07, 2015 at 11:33 AM · uitextinputfieldlayout

Layout group children adjust to content

Hi Unity Community

I am trying to make two children (a UI Input Field and UI Text) of a Vertical Layout Group adjust vertically to their text component input content.

The docs suggest that you need to add a Layout Element to the child you want to expand (which I have done), disable the Child Force Expand from parent Layout Groups (which I have done) and set their Child Alignment (which I have also done (Upper Left)).

While the Input Field now expands large enough to account for larger amounts of text input, it is not responsive to the amount of text entered into it. The Text UI object does’t expand at all to account for the text input length (this is derived from the Input Field string return) and the Content Size Fitter conflicts with the parent Layout Groups (I'm pretty sure I followed the docs right?).

Can someone please explain to me where I am going wrong; it seems so simple yet I can’t seem to get this functioning properly.

Many thanks in advance,

Ryan

GUI (first highlighted element is the Text component - notice it hasn't adjusted to the appropriate height of the Input field content - second highlighted section) alt text

UI Text Editor Settings !

Parent Layout Groups, Input Field and Text Editor Settings alt text

screen-shot-2015-09-07-at-105324-pm.jpg (40.7 kB)
screen-shot-2015-09-07-at-105653-pm.jpg (500.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

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by RyanAchtenSoma · Sep 08, 2015 at 01:31 AM

I'm not actually sure if this is even feasible with the default InputField, as described in this post here: 'because of the logic in the script to position the Caret and overflow text handling. The Layout is not updated to take account of the text content. The control is actively working against you in this case.'

Seeing as this may not be feasible (without detracting from the purpose of this question), I have temporarily created text and input fields at a set size.

However if anyone has a work around to this issue using the built in UI system I would be very interested to hear your thoughts.

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

29 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

Related Questions

Inputfield text to String variable 1 Answer

UI InputField text sometimes invisible? 1 Answer

Changing just the name of person in UI Text 0 Answers

Get Text from an Input Field on one scene and use it as a text on another scene Unity c# 0 Answers

Prevent focus from leaving inputfield 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