- Home /
Duplicate Question
The name 'GameObject' does not denote a valid type ('not found'). BCE0018
I edited my script in MonoDevelop-Unity and I am trying to debug it. I am getting error while creating objects: The name 'GameObject' does not denote a valid type ('not found'). BCE0018
Code:
var e2 : GameObject = GameObject.CreatePrimitive(PrimitiveType.Sphere);
e2.transform.position = Vector3(2, 1.5, 0);
I noticed that many people have similar error because of misspelling, I can't see any, I did everything according to tutorial http://docs.unity3d.com/ScriptReference/GameObject.CreatePrimitive.html I tried retyping, it does not change anything.
In main Unity window I am getting error few lines before with StreamReader
sr = new StreamReader(txtname);
and many variables (unknown identifier) but not with GameObject. Should I care about MonoDevelop?
how do you know that the posted code is where the error is? was there a line number in the error message? if there is, it's a good idea to post the complete error message.
can you post more of your code - the posted section is ok so it's possible that there's an error before this...
Follow this Question
Related Questions
Getting an object from another script... 1 Answer
Set variable into object and conferring but object Math game 0 Answers
Need help equating the values of variables between objects,Need help equating values between objects 1 Answer
C# taking variable from other script 2 Answers
Accessing Scripts and Their Variables from other Objects 3 Answers