- Home /
This question was
closed Jul 12, 2016 at 06:52 PM by
Eagle-Bound for the following reason:
The question was answered
Text isn't showing up on button
In my clicker game I have a set of code:
using UnityEngine;
using System.Collections;
public class UpgradeManager : MonoBehaviour {
public Click click;
public UnityEngine.UI.Text itemInfo;
public float cost;
public int count = 0;
public int clickPower;
public string itemName;
private float _newCost;
void update () {
itemInfo.text = itemName + "\nCost: " + cost + "\nMPC: +" + clickPower;
//MPC is the "power" of the item
}
This code is supposed to display the item name, the cost and the "power" of it. However, when I play the game, the buttons do not show the text. If anyone know why this is happening, I would really like to know. Thanks!
Comment
Thank you! I can't believe that was such a simple mistake.
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
Ui Button with multiple text prompts 1 Answer
How to update text every time I press space? 1 Answer
Multiple Cars not working 1 Answer