Will there be exposed static variables support?

Hi,

Why can’t the exposed variables be static (e.g. public static GameObject myPrefab)?

I’m trying to instantiate a prefab which should receive a texture when created:

MyScript ms = (MyScript)((GameObject)Instantiate( myPrefab )).GetComponent(typeof(MyScript));
ms.setTexture( someTexture );

But this isn’t practical because I have to remember to do the setTexture.
What I wanted was to create a function which received the texture and returned the object properly created.

So what I was trying to do was to create my own MyScript.instantiate( someTexture ), which was static and returned the the object with the texture assigned, but the problem is that the editor doesn’t expose static variables. Will this change in the next versions?

Regards,
Afonso

Just a bump for this request. It seems strange that they can’t be exposed. I’m resorting to copying the values of the exposed non-static variables to the static variables on start. Pretty ugly method :slight_smile: