How to make static variables viewable in the inspector?

Ughh I’ve been stuck on this for hours any kind of lead will help.Ok so this is my variable: (in JavaScript)

static var damage : int;

it works but I can’t view it from the inspector. When I took away the static part it showed up and when I put static back in it was hidden. How do I make it visable? Thanks!

You can’t.

Unless you write a custom editor.

if you want to see a static variable. display it to the screen in a gui function. Otherwise you are out of luck

You could change it to a member variable on a singleton.

Anything in the inspector is instanced. By definition static variables can’t be instanced, so it would make no sense for them to be in the inspector. It’s quite likely you don’t want a static variable. By the way, please don’t spam your topics. I deleted the other copy.

–Eric

When I wanted a static var in the inspector, I created a regular public var that was viewable in the inspector, and then in the Start function, assigned whatever value was in the var to the static var. it’s a little extra step, but it works okay for me.