2017-10-16 35 views
1

“得分:”没有在统一ide.I上显示,我尝试了很多,似乎没有任何工作,没有得到预期的输出。Thankyou.Sry for bad English。scoreText.text不能统一工作

using System.Collections; 
using System.Collections.Generic; 
using UnityEngine; 
using UnityEngine.UI; 

public class uiManager : MonoBehaviour { 
public Text scoreText; 
int score; 

// Use this for initialization 
void Start() { 
    score = 0; 

} 
void score_view() 
{ 
    score = move.score; 
    Debug.Log("uiManager Score:"+score); 
    scoreText.text = "Score:"+score; 
} 

// Update is called once per frame 
void Update() 
{ 
    score_view(); 

} 
} 
+0

'Update'游戏运行时只运行。如果你没有运行游戏,你不会看到 –

回答