Where can I find a complete list of Attributes and how they work and

How I can apply them to public variables then showing in my script in a component in the Inspector?

I’d really like to only show some public variables if variables above have a certain value.

For instance, let’s say I have a public int ItemType (and let’s say 1 means weapon).

I might only want to show Weapon public variables in the inspector if ItemType = 1. I might also adjust how the Inspector displays the variables in that component based on bools etc.

So I really need a complete list as well of these attribtues.

Finally, how do I go about applying more than one Attribute to a public variable AND how do I go about applying say one Attribute to a whole clump of public variables?

Help…

[HideInInspector] can be used to hide a public variable from the inspector. :slight_smile:

 [HideInInspector] public int myInt;

Here is the attribute list:
Attribute list

And I believe that This answer will give you the information you need to only show certain variables in the inspector depending on others. :slight_smile:

I hope this helped you!

Might want to look into Inheritance. Instead of having an ItemType variable, you could have actual types that inherit from Item. That way, a class like Weapon would only contain the variables relevant to Weapon and the inherited variables from Item. This would help separate the data and functionality of all your Item types, without having to hack around with inspector attributes