So I’m relatively new to C# and some text for a script I’m writing isn’t working? I’ve been trying to work it out for quite a bit and I can’t seem to work it out, any help would be appreciated. Here is my code
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class Text : MonoBehaviour {
Text gmpc;
int gmpcs = 1;
// Use this for initialization
void Start () {
gmpc=GetComponent<Text>();
gmpc.text = gmpcs;
}
// Update is called once per frame
void Update () {
if (Input.GetKeyDown('space'))
gmpc.text = gmpcs + 1;
}
}
I’m getting errors CS1061 and CS1012 and unexpected symbol
Thanks for the help