Advertisement
DamianNeedsALife

Error

May 20th, 2018
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. using UnityEngine;
  2. using UnityEngine.UI;
  3. using System.Collections;
  4.  
  5. public class TextController : MonoBehaviour {
  6.  
  7. public Text text;
  8.  
  9. void Start () {
  10. text.text = "Hello world!";
  11. }
  12.  
  13. void Update () {
  14.  
  15. if (Input.GetKeyDown.(KeyCode.Space)) {
  16. text.text = "Space key was pressed.";
  17. }
  18.  
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement