- Home /
Can't See variables in inspector
I started a project and everything was ok. Now I try to add variables like i used to and i can't see them in the inspector. is that some kind of setting?
Answer by J.D. · Aug 20, 2011 at 10:11 PM
The Inspector only shows the PUBLIC variables.
If, for some reason, you need to check private variables, just add this in the above line of your variable [SerializeField]
Example:
public a;
private b;
[SerializeField]
private c;
A and C will be in the Inspector.
You can use debug mode for seeing private variables, ins$$anonymous$$d of changing your scripts.
Answer by Waz · Aug 21, 2011 at 12:37 AM
Or maybe you have folded the script closed in the inspector. Click on it in the inspector to open it out again.
Your answer
![](https://koobas.hobune.stream/wayback/20220612185042im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Variables assigned in inspector disappear in git version-control? 1 Answer
When I try to increment a variable by 1, why does it add 10? 1 Answer
Inspector won't update with new variables.,Variables don't seem to update on inspector 0 Answers
Creating a dropdown menu for variables? 2 Answers
Inspector slider value? 2 Answers