- Home /
How to make text appear when other text is clicked?
I have created 3d text and would like another 3d text to appear when the first 3d text is clicked.
Answer by robertbu · Jan 25, 2013 at 03:42 AM
Make sure the one you want to click on has a collider. Turn off the renderer on the one that starts out hidden. Then you can use something like this:
var goOther : GameObject;
function OnMouseDown(){
goOther.renderer.enabled = true;
}
You'll drag your hidden game object to the goOther variable in the inspector. There are other ways, but this s starting point.
Thanks! Worked great in my game once, i added the right collider.
Your answer
Follow this Question
Related Questions
Stopping 3D text from showing through game objects in free unity. 1 Answer
render.material.color is not working, or at least not completely? 1 Answer
3D Text not changing font 1 Answer
How to split up a text into substrings of single chars at the exact same position 0 Answers
3D Text goes messed up once screen size is changed help? 0 Answers