• 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
6
Question by rct3fan24 · Jul 16, 2015 at 12:06 AM · inspector

How do I make text boxes in the inspector bigger?

I'm trying to make a dialog system for my game, but the text boxes in the inspector for editing strings are so small, writing lines becomes fairly obnoxious. I've seen large text boxes in the inspector. How can I make them bigger?

It would be good if those sprite variables could be a large square like when you're making a material, too.

Thanks for your help guys.

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

3 Replies

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

Answer by nadhimali · Jul 16, 2015 at 07:49 AM

Why making it so complicated people ? Add this above your string variable

   //TextAreaAttribute(int minLines, int maxLines);
   @TextAreaAttribute(15,20)

this will make your box bigger in inspector because you put minimum lines before enlarging the box 15 and the box will enlarge till 20 lines then a scrollbar will be shown.

read here TextAreaAttribute

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
avatar image
26

Answer by mautere · May 09, 2017 at 05:44 AM

Not sure if this has been changed at some point, but this is what worked for me:

 [TextArea(15,20)]
 public string Description = ""; 

source: https://docs.unity3d.com/ScriptReference/TextAreaAttribute.html

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
avatar image
1

Answer by allenallenallen · Jul 16, 2015 at 03:58 AM

If you are using your own scripts, you can use a custom inspector. You can then use Multiline: https://www.youtube.com/watch?v=z2jnWRvz_C8

If you are using default UGUI, then I'm not so sure.

However, if you are making a dialog system, why are you typing in the inspector in the first place?

I would recommend you to have all the dialog typed up in a text file like a text asset. http://docs.unity3d.com/Manual/class-TextAsset.html

Then once you finished your dialog system, you can just edit the text file anytime you want. This also makes localization much easier.

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

25 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

Related Questions

Give composite classes drop down list in inspector 0 Answers

Is it possible to create a custom model preview in an Editor window akin to the one displayed when an FBX is selected? 3 Answers

Giving a public Transform field a default value in the inspector 1 Answer

Array elements are empty in the inspector? 1 Answer

Custom Inspector Variables 1 Answer


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