So i have a quick question, who can help me done this.
I want to show 3D Text "Score: " and also with score i want to show a counter like this "Score: " + counter
Ok so i have already done this Debug.Log("Score: "+i.ToString()); but now i want that same Debug.Log to show on the 3D Text and i just don0t know how :S What i am doing wrong or what ever. I have done it like this: TextMesh 3dtext;
3dtext.tex="Score: "+i.ToString();
But this is not working at all :S
1)In Game Hierarchy , create 3D Text . the object is named New Text
2)drag and drop the following script (name it text3d) to this object
using UnityEngine;
using System.Collections;
public class text3d : MonoBehaviour
{
int counter = 0;
TextMesh text;
// Use this for initialization
void Start () {
text= gameObject.GetComponent("TextMesh") as TextMesh;
}
// Update is called once per frame
void Update () {
text.text = "Score: "+counter.ToString();
counter++;
}
}
3)Implement the script and change the setting of your 3D text to customize it