Hello again,
I’m very new to C#, but desperately want to start learning. However, I’m having some trouble with something that I’m pretty sure is very simple.
In Javascript, I could easily do this…
private var GameGod : GameObject;
private var GameScript : GodScript;
function Start() {
GameGod = GameObject.Find("Game God");
GameScript = GameGod.GetComponent("GodScript");
}
However, when I try to do something similar in C#
private GameObject GameGod;
private GodScript GameScript;
void Start () {
GameGod = GameObject.Find("Game God");
GameScript = GameGod.GetComponent("GodScript");
}
I get an error saying “The type or namespace name “GodScript” could not be found. Are you missing a using directive or an assembly reference?”
I’m not sure what’s wrong, but I have a feeling I’ll feel stupid when I find out lol.