Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 piece-of-toast · Jan 17, 2015 at 06:32 PM · guitextscrollviewheighttextasset

Finding the height of a text asset.

Hey everyone. Im using a textasset for some terms and conditions. Then sorta realised that I don't know to ref its height which I need to get an appropriate sized scrollview. Anyone have any ideas on how to solve this? PS: It's a .txt if that makes a difference?

EDIT: Also noticed that the text asset is only showing half its content... just cuts of about half way. Checked the document. It's all there. Anyone ever hear of this happening either?

Comment
Add comment · Show 2
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 gjf · Jan 17, 2015 at 01:27 PM 0
Share

the source of you text isn't as important as how you're trying to display it which you haven't told us.

try posting your current code or, at the very least, some additional info about how you're trying to do it - for example, are you using the 4.6 ui???

avatar image piece-of-toast · Jan 17, 2015 at 01:39 PM 0
Share
     scrollview = GUI.BeginScrollView (new Rect(0,raise*2,scrW+indent,raise*16), scrollview, new Rect(0, 0, 0,scrH*12));
         GUI.Label (new Rect(0,0,0,scrH*12),asset.text,inco$$anonymous$$gGUIStyle);
         GUI.EndScrollView ();


I've tried using text area as well ins$$anonymous$$d of label. EDIT: scrH is screen.height. I just times it by 12 so I could see the Terms display. What I'm trying to do is turn that scrH*12 into asset.text.height.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by iwaldrop · Jun 28, 2016 at 09:55 AM

Is this in game or the editor?

  1. if editor, just leave it as a readme.

  2. if in-game, I'd format it as html and use Application.OpenURL

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Resize scrollview height to match size of box inside 0 Answers

Text Asset not displaying correctly. 0 Answers

Maximum length of text in a GUILayout.Label? 1 Answer

4.6 GUI Button inside a scrolling Text Box 0 Answers

New GUI - Text not rendering in front of geometry if using a Mask 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