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
1
Question by djkr · Jan 30, 2012 at 12:49 PM · textiphonetextmesh3d text

iPhone/3D Text only one line displaying not multiple lines of 3D Text

iPhone does not seem to display 3D Text as multiple lines... it only shows one line The PC/Mac eversion shows all multiple lines of text (so all line breaks, and the different lines show up).

FYI - See proramming below, but the multiple lines of text (to be displayed using 3D Text - were sent by a single variable from a database (MySQL/PHP) with
Breaks made into "/n" as Referenced.

Been searching all day, still cant find the answer- so I'm posting it here.

Anyone know how to make more than one line appear?

Project Description: Basic utility that grabs a long shopping list (with multiple line breaks) from a database and displays it on iPhone as slide-able 3D Text. Moves fine - jut does not show more than the Top line of a long shopping list.

Code:

 //var texxxt : GameObject; //if the 3D texxt is instantiated - in this case this script is just attached directly to the 3D Text GameObject
 
 var answerr : String;
 var texaaa : String;
 var lenn : int;
 
 
 function Start(){
 //get text (list of text)    
     var code_url = "link-to-PHP-script-that-grabs-the-text.php";
 
 //  POST URL
     var textor = WWW(code_url);
      yield textor; // Wait    
 
 //  ANY ERRORS?
     if(textor.error){ //Probably not connected to the Web
         TextHints.message = "ERROR (CHECK INTERNET CONNECTION)";
         TextHints.textOn = true;
 
     }else{
 
 // request completed!
     answerr = (textor.text);//converts binary to text
 
     var amount = answerr.length;//counts the full text (including line breaks)
 
     if (amount == 1 || answerr == null || answerr == "null") { //if its too small or empty then Destroy or Do Nothin'
 
 //nothin Destroy the text or dont instantiate it
 
     } else {
         var texa = Regex.Replace(answerr, "~", " ");//replace ~ with a space
         yield(texa);
         var texaa = Regex.Replace(texa, "_", "\n");//replace _ with a line break
         yield(texaa);
         texaaa = Regex.Replace(texaa, "<br>", "\n");//replace <br> with a line break
         yield(texaaa);
         texaaa = Regex.Replace(texaa, "<br />", "\n");//replace <br /> with a line break
         yield(texaaa);
                 
         lenn = texaaa.length;//count the length (for future use)
         
 //Assign the Text mesh the text ?? should this be different for multiple lines?
         GetComponent.<TextMesh>().text = texaaa; //3d-text with line breaks??
         guiText.text = texaaa;
 
         print("Word count: "+lenn);//for DeBugging
         print ("FINAL text: "+texaaa);//for DeBugging
 
 }
 
 
 
 }    
 }
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

Answer by djkr · Mar 26, 2012 at 07:31 AM

Hi, Has anyone else solved this?

The temporary solution I had to create was to grab the (multiple lined) text file from the web, (using a loop) I split up each line and basically had to instantiate each line (space evenly, one below the other)...

Is there no way to display paragraphs of information? Anyone?

DJKR

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Text Mesh to Mesh ? 2 Answers

Jagged and pixelated fonts in text mesh 3d (iphone) 4 Answers

Putting text on a 3D object? 3 Answers

How To Get Rid Of Grey Box Thing Around Text Mesh 0 Answers

How do I use Unicode characters in TextMeshPro 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