Quantcast
Channel: Questions in topic: "error"
Viewing all articles
Browse latest Browse all 7934

CS0103 and CS0246 with "public Text text;"

$
0
0
So when I define anything in public, for reference (LevelManager, Text) it makes it red and gives me error CS0246 and CS0103 as errors. Also, when I connect it to my object, the public doesn't give me a place to drag the thing I want to onto it. I'm new to Unity, and I have gone through the Q.A., but I can't find anything. **HELP!!!** Code: using UnityEngine; using UnityEngine.UI; using System.Collections; public class LoseColliderScript : MonoBehaviour { public LevelManager levelManager; void OnTriggerEnter2D (Collider2D trigger) { levelManager.LoadLevel("Win"); } } The main thing is that when I comment out the "public" line, everything works.

Viewing all articles
Browse latest Browse all 7934

Trending Articles