- Home /
Variables Won't Appear In Inspector
I was trying to write a script last night, but the variables wouldn't appear in the inspector. I verified carefully that I had no compiler errors, and my syntax was correct. Finally I just got frustrated, deleted the entire script (there are no errors on any other script because it was working fine up until I tried to write this script) No errors appear in the console, even when I hit play. I experimented, and I wrote a super simple script including only an empty function update and one variable above it.
var item : GameObject;
function Update () {
}
That's it. It still wouldn't appear. Is there an error in Unity itself causing this?
Please don't open numerous copies of your question. Until you have 15 karma points, your questions will go through moderation and there will be a delay from when you ask the question until it appears on the list.
Can you explain please what you mean robertbu? $$anonymous$$y computer might have had a problem because it was going very slow when I submitted this question and it was blank for a day every time I looked at it so what happened? Ya I don't understand what you mean by numerous copies did it send multiple copies of my question?
Answer by Nick4 · Jun 15, 2014 at 03:38 AM
Make sure they are public and not static. If you're using javascript, also make sure it doesn't have the "internal" modifier.
Something else I thought of, if I had alot of variables (50+) on a script in the inspector could that overload the inspector and make further variables unable to appear? I've tried everything I know and also submitted a bug report about it. This one really has me stumped
Your answer
Follow this Question
Related Questions
Using arrays in inspector variables 3 Answers
Drop down with sizes 1 Answer
Asset: Pimp my Editor - Javascript Help 0 Answers
Data type, class, or struct that represents a 0,1 range 3 Answers
How do I show a Classes Vars in the inspector (Javascript)?? 2 Answers