Skip to content

Instantly share code, notes, and snippets.

@tinyhappysteps
Created January 5, 2016 14:55
Show Gist options
  • Save tinyhappysteps/f88983652b572dfdf869 to your computer and use it in GitHub Desktop.
Save tinyhappysteps/f88983652b572dfdf869 to your computer and use it in GitHub Desktop.
Hello World Unity App - Simple Unity3d Button click and text updates
// Unity project here: https://www.dropbox.com/s/8nsuolthw2dzv4b/My%20Second%20Game%20Attempt.zip?dl=0
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
public class Work : MonoBehaviour {
public Text text;
private int cash = 5;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
public void DoStuff () {
cash++;
text.text = "my cash = " + cash.ToString();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment