My text goes up just fine, but how do I make my text face towards the camera? Also, how do I alter my texts’ alpha channel so I can create a “fade away” effect?
Note: I use a text mesh on a “dummy” game object.
using UnityEngine;
using System.Collections;
public class CombatText : MonoBehaviour
{
void Update()
{
transform.Translate(Vector3.up * 0.1f, Space.World);
}
}
Note that this code is dependant on what your text shader is and if it respects the color property of a material. You can also use Material.SetColor() to set any other color property within a material.