- Home /
Question by
omarwork20 · Aug 23, 2018 at 11:04 PM ·
character
From the video ((SCORE & UI - How to make a Video Game in Unity (E07) )) how to fix ?
In "
SCORE & UI - How to make a Video Game in Unity (E07) " I wrote like this in the text script ----->
using UnityEngine; using UnityEngine.UI;
public class Score : MonoBehaviour {
public Transform player; public Text scoreText;
// Update is called once per frame void Update () { scoreText.text = player.position.z.ToString(); } }
and it does not work, help.
Comment
Answer by coinnip_unity · Aug 24, 2018 at 01:05 AM
Did it print any error in UnityEditor console? I need enough information.
I think you might forget connect "scoreText" (in script) with "Text" Component (in UnityEditor Inspector).
plz check 7:40 in the video
if you write or upload capture the error message log, it will be helpful to understand ur problem...
Your answer