Skip to content

Instantly share code, notes, and snippets.

@AkshatGiri
Created June 23, 2016 22:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AkshatGiri/89029553eb472972b4a3a0a319f10a5b to your computer and use it in GitHub Desktop.
Save AkshatGiri/89029553eb472972b4a3a0a319f10a5b to your computer and use it in GitHub Desktop.
How to display text?
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class bricksLeft : MonoBehaviour {
private int BricksCount;
private brick Bricksleft;
public Text text;
// Use this for initialization
void Start () {
Bricksleft = GameObject.FindObjectOfType<brick>();
}
// Update is called once per frame
void Update () {
//BricksCount = brick.BreakableCount;
text.text = brick.BreakableCount.ToString();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment