- Home /
how to Display time after game complete
currently i have this,
function winGame () { if (winPoint >= 10) { Debug.Log ("You win"); guiText.text = Time.timeSinceLevelLoad.ToString(); } }
but i get this error
MissingComponentException: There is no 'GUIText' attached to the "playerEgg" game object, but a script is trying to access it. You probably need to add a GUIText to the game object "playerEgg". Or your script needs to check if the component is attached before using it. eggStatus.winGame () (at Assets/Scripts/eggStatus.js:66) eggStatus.winGame (Int32 pointsToApply) (at Assets/Scripts/eggStatus.js:30) winScript.OnTriggerEnter (UnityEngine.Collider objectCollided) (at Assets/Scripts/winScript.js:9)
i dont have any idea on how to use the gui.text so...
Answer by $$anonymous$$ · Jul 09, 2013 at 04:44 AM
Attach a gui text componet to your gameobject : link
hi, i've already attached the gui text but after i finished the game nothing appears.
Your answer
Follow this Question
Related Questions
Fade in AudioLister over time #c 1 Answer
slow a lerp ? array/static problem 1 Answer
Move a keyframe in time only 1 Answer
Wait a specific time? 1 Answer
Make value change to anoter over time and back loop 3 Answers