I am trying to figure out what i am doing wrong;
i am following this tutorial (14:01);
But, i still have this inside the script / no public thingies? :
using UnityEngine;
using System.Collections;
public class Click : MonoBehaviour {
public UnityEngine.UI.Text goldDisplay;
public int gold = 0;
public int goldperclick = 1;
void Update(){
goldDisplay.text = "Gold: " + gold;
}
public void Clicked() {
gold += goldperclick;
}
Code also should seem allright… ?
Also very noobish question, i seem to cannot change the canvas size? ;D
Remember to hit CTRL+S (or equivalent) in your editor so that the script actually saves. An unsaved script won’t show any differences in Unity. They also won’t show up if you have any errors. Errors should be visible if you open the Console (Window => Console or CTRL+SHIFT+C) or click the status bar at the bottom of the screen if and when text shows up in it (white for information, yellow for warnings, red for errors).
I honestly don’t know, so you’ll have to wait for someone else who’s maybe had a problem like this. I noticed in the script you copied, you’re missing the last } but I assume this was a copy problem and not a script problem, or else it would’ve given you an error. Try saving the scene (and project) and restart Unity to see if it shows up then?