why we used hideinspector ???

i m the begner so tell me in detail.
thanks

1 Answer

1

You use [HideInInspector] above variables which are public that you don’t want visible in the inspector in unity. This might be because you want to have a public variable accessible from another script, but not that the user can edit in the inspector and assign to the wrong thing…

This and uncluttering inspector which may get kind of stuffed if you have something like +30 variables listed in there.

Did you try my logic?