i am creating a game which is creating a game object again and again… of different colors… i want to add alphabets randomly written from a to z on the surface of gameobject… the code until now is:
#pragma strict
var delay: float=0.5f;
var sphere:GameObject;
function Start () {
InvokeRepeating("OnCollisionEnter",delay,delay);
}
function OnCollisionEnter() {
var go = Instantiate(sphere,new Vector3(Random.Range(-3, 3),-3,-12.78451),Quaternion.identity);
go.renderer.material.color = Color(Random.value, Random.value, Random.value);
go.renderer.material.text = text
}