|
Hey guys, I was wondering, how can you draw 3D text from code??? Thanks -Grady
(comments are locked)
|
|
You can also do this: Done. :) This is not "from code" =)
Jul 05 '11 at 09:15 AM
Marnix
just to clear this up from both examples, what i am meant to do is create an empty game object in the hierarchy, and then attach Component -> Mesh -> Text Mesh to it. Then drag that into the variable????? because in Legion's example, that's what i did, but nothing came up, for Legion's example, am I actually supposed to create a 3D text game object in the hierarchy????
Jul 05 '11 at 10:03 AM
Grady
ok, with Legion's example, i managed to get the script to work with a 3d text object, but i need the text to appear and then dissapear within another script, so say when the user presses a button, then it should appear, and then when they press it again, then it dissapears.... and also, is it possible to make the text appear at any place within the scene from the script?
Jul 05 '11 at 10:06 AM
Grady
Yes, you can enable and disable the MeshRenderer that is also attached to the GameObject.
Jul 05 '11 at 10:17 AM
Marnix
OK, I'm using Legion's example, but what do I do? considering you both helped just as much.... I don't know who to give the right answer to... unless you guys want me to vote up both your answers or something.... :P
Jul 05 '11 at 10:37 AM
Grady
(comments are locked)
|
|
Use a Update It depends if you need to set a font or not, because I don't know if there is a default one. Please check that in your Hierarchy. So do I make the 3d text in the heirarchy first?
Jul 03 '11 at 10:36 AM
Grady
what do i put in "the text" variable? is that supposed to be a premade 3d text or something????
Jul 03 '11 at 11:39 PM
Grady
I think you also need to add a meshrenderer. As you can see in the TextMesh link I provided. Will update my answer.
Jul 04 '11 at 09:09 AM
Marnix
i keep getting the following error in the console: "ArgumentException: You are not allowed to call Internal_CreateGameObject when declaring a variable. Move it to the line after without a variable declaration." I'm not sure what I've done wrong... -Grady
Jul 04 '11 at 11:04 PM
Grady
(comments are locked)
|

Retagged 3d, text to 3dtext and textmesh. Greetz, Ky.