2017-10-16 114 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'遊戲運行時只運行。如果你沒有運行遊戲,你不會看到 –

回答