Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using UnityEngine.UI;
- using System.Collections;
- public class TextController : MonoBehaviour {
- public Text text;
- void Start () {
- text.text = "Hello world!";
- }
- void Update () {
- if (Input.GetKeyDown.(KeyCode.Space)) {
- text.text = "Space key was pressed.";
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement