- Home /
How to create a text using javascript?
Hi everyone,
I'm creating a 3D model simulation using unity. In that model I need to add texts like A, B, C, D.. to indicate a particular component. How to create these type of text using javascript?
umm text? do you mean GUIText? 3dText? the names of Objects? text displays made with polys? text painted on some texture. please be a little more specific on what text you are talking about.
Hi, The text will indicate an object name. (For example: I'm developing a gear box assembly, In this assembly I need to indicate the component name)
then that would be either GUI text or 3dText, they already exist in unity, but you probably already know this. you just need to right a script that takes the objects name and applies it to the GUItext component.
Answer by tanoshimi · Nov 22, 2013 at 08:16 PM
Does this script do what you want?
Hi, Yes, Exactly similar to the image which you have given is required. Do you have any specific script for creating "cube, sphere" text in your model?
Yes, click the words "this script" in my post to get the exact script used...
Hi, I am unable to add text for my object using the script. Can you give me a basic script?
why can't you add it? are there compiler errors? (red text at the bottom of the screen) , the scripts is working for me when i tested it.
Your answer

Follow this Question
Related Questions
Creating a text on a surface 1 Answer
TextField text component not updating 2 Answers
RPG Text 2D on Object Interaction Javascript 0 Answers
I'm trying to display my ammo; not working 2 Answers
Text To Speech? 0 Answers