using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class RandomAngle : MonoBehaviour { public Text txtAngles; float fAngleX, fAngleZ; // Use this for initialization void Start () { fAngleX = Random.Range(-20.0f, 20.0f); fAngleZ = Random.Range(-20.0f, 20.0f); txtAngles.text = "(" + string.Format("{0:F1}",fAngleX) + "," + string.Format("{0:F1}", fAngleZ) + ")"; } // Update is called once per frame void Update () { } }