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 Lemi · Mar 15, 2011 at 06:28 AM · change3dtext

Changing TEXT (text value) within 3D text

How in the mother of God, can text value in 3D Text, be changed IN JAVASCRIPT?

Now, my code is this;

GetComponent.().text = "TRALALA"

Now, this works! Excellent, even! It will transform text value, whatever it was to "TRALALA". But, there is one small, tiny problem. How, but HOW, can i put "space" between words?

like:

GetComponent.().text = "I am riding a bicycle." ofc it won't work. Is there a special symbol for spacing, or what should I do?

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 Eric5h5 · Mar 18, 2011 at 08:05 PM 0
Share

Don't write "solved" in the title, mark the answer as accepted.

avatar image Lemi · Mar 19, 2011 at 04:19 AM 0
Share

Yeah, i just noticed that. The "solved" i lefted only for info. I didn't knwo how to accept the answer, and today I found that "ok" sign. Anyway, I won't do it again. Now I know.

2 Replies

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

Answer by Mike 3 · Mar 15, 2011 at 06:55 AM

That should work fine

GetComponent.<TextMesh>().text = "I want to ride my bicycle";

works perfectly well for me in javascript

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 Lemi · Mar 18, 2011 at 02:29 AM 0
Share

Oh my God.. It works, LOL! I thought that noone will answer, 'cause, you know, everywhere on forums there is not much, how to say, feedback. I thought this is a waste of time, but, i have searched all over the internet, couldn't find it. So, I have to put .... Thanks a bunch, i tried it, it works! I am doing a menu for FPS game. Very neat menu too. But, not so good with scripting, I work with unity for 3 or 4 days now. It's not a bad menu, I will post it later when it's finished. Tell me one more thing, are u familiar with the iTween for unity?

avatar image Mike 3 · Mar 18, 2011 at 03:30 AM 0
Share

Not really, sorry

avatar image Lemi · Mar 18, 2011 at 03:45 AM 0
Share

Ok, thanks anyway. One more thing, if I may ask, I don't know much about program$$anonymous$$g. But, Unity uses JavaScript. Now, is this implementation of Java script in Unity different from how should I say.. The Java Script original? (now the trolls are dying from so much possibilities to say all kind of things to me :D )

avatar image Mike 3 · Mar 18, 2011 at 04:03 AM 0
Share

It's not that similar, some of the syntax is the same, but how you use it is fairly different. Small note - you may want to check out the irc channel ( #unity3d on irc.freenode.net ), easier to have conversations ;)

avatar image Lemi · Mar 18, 2011 at 04:53 PM 0
Share

Ah, okey :D Thanks again for helping me out!

Show more comments
avatar image
0

Answer by DaveA · Mar 15, 2011 at 07:23 AM

Maybe the spacing in the font you are using is pretty thin? Try another font or play with the font settings.

Comment
Add comment · Show 1 · 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 Lemi · Mar 18, 2011 at 02:25 AM 0
Share

Nope, that's not it, but thanks anyway for the comeback!

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

No one has followed this question yet.

Related Questions

Unity3d Battery Life Change 3D text Java script 0 Answers

Change camera on text click? 1 Answer

Changing the type of a variable 2 Answers

Limiting the amount of times a button can be pressed? 1 Answer

On Touch change color 2 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