here is the code :
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using System;
public class RMP_count : MonoBehaviour {
// REFORMED UI RMP DATA
public GameObject Rmp;
private Text text;
private string canvas_RMP_to_string;
private string y;
// Use this for initialization
void Start () {
text = Rmp.GetComponent<Text> ();
}
// Update is called once per frame
void Update () {
float x = float.Parse(text.text);
y = text.text;
y = Math.Round((x / 1000) , 1).ToString();
text.text = y;
Debug.Log (text.text);
}
}
I get what i want in Debug.Log (text.text);
part and it is perfect but the problem is the part text.text = y;
it IS NOT ASSIGNING and in game scene it is not shows up !!!
what can i do?