Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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
3
Question by Noltop · Mar 27, 2012 at 07:10 AM · textprintgui-text

Display a block of text to the screen

I feel a little silly actually asking this but, how do i print a block of text the screen? All it needs to do is sit there and be readable. Ive tried using GUI text in the hierarchy but the entry field doesn't seem to accept any form of new line command and the block of text will have multiple lines. Any help at all on this would be greatly appreciated.

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
9
Best Answer

Answer by TomHunt · Mar 27, 2012 at 07:23 AM

 function OnGUI(){
     GUI.Label(Rect(0,0,Screen.width,Screen.height),"Here is a block of text\nlalalala\nanother line\nI could do this all day!");
 }
Comment
Add comment · Show 6 · 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 AlucardJay · Mar 27, 2012 at 08:32 AM 0
Share

a search engine is your friend :

http://unity3d.com/support/documentation/Components/GUI%20Scripting%20Guide.html

http://unity3d.com/support/documentation/Components/gui-Basics.html

http://unity3d.com/support/documentation/ScriptReference/GUI.html

avatar image vinorodders · Apr 27, 2013 at 08:26 PM 1
Share

hey is there a way of making this text appear and disappear in a certain space?

avatar image xortrox · Apr 27, 2013 at 08:49 PM 0
Share
 var showText = true;
 var textArea = new Rect(0,0,Screen.width, Screen.height);
 
 function OnGUI()
 {
 
     if(showText)
     {
 
     GUI.Label(textArea,"Here is a block of text\nlalalala\nanother line\nI could do this all day!");
 
     }
 
 }
avatar image kscho · Jun 30, 2014 at 07:25 AM 0
Share

hi all, is it possible to do the same thing but it pinned to a face of a cube? I also need to be able to dynamically update the block of text based on live events.

Thank you for your help!

avatar image KokodokoGames · Sep 01, 2015 at 09:59 AM 0
Share

Is it possible to show text without using the GUI system? It seems rather clunky to me, especially if you just want to display a simple little text without introducing an entire new system.

Show more comments

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

9 People are following this question.

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

Related Questions

How do I make my player in unity print text. 2 Answers

Text Appears in Inspector but Not on Screen 0 Answers

I am trying to print text in unity using this command 'using function OnGui () {' 1 Answer

Any fade-in/fade-out animations for GUI Text? 3 Answers

how can I print to text the number of an int as well as the name of the int. 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