x


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?

more ▼

asked Aug 20 '11 at 08:34 PM

frenzicious gravatar image

frenzicious
1 1 1 1

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

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.

more ▼

answered Aug 20 '11 at 10:11 PM

J.D. gravatar image

J.D.
116 1 2

You can use debug mode for seeing private variables, instead of changing your scripts.

Aug 20 '11 at 11:16 PM Eric5h5
(comments are locked)
10|3000 characters needed characters left

Or maybe you have folded the script closed in the inspector. Click on it in the inspector to open it out again.

more ▼

answered Aug 21 '11 at 12:37 AM

Waz gravatar image

Waz
6.4k 22 33 70

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x665
x466
x342

asked: Aug 20 '11 at 08:34 PM

Seen: 1322 times

Last Updated: Aug 21 '11 at 12:37 AM