Can someone explain C# static variables usage to me, when accessing from another script? : <p>Keep in mind I'm new to C#. Static variables don't seem to serve the same purpose as in C/C++, Fortran, etc. so I'm struggling a bit, esp. with this:</p>

<p>I want to be able to attach game objects to variables using the inspector, but access those variables (say, the color of Text UIs) from another script, without hard-coding object names (which could change) and using Find/GetComponent. </p>

<p>If I make the game objects static, I can access them instead with a statement like classname.objectname. However, the inspector no longer sees those variables (since they're static?), and so I can no longer attach a game object to them using inspector, so I'm back to using GameObject.Find or GetComponent and hard-coding the names somewhere in my code. Hopefully, I'm just ignorant about something, hence my question.</p>

<p>So: how can I declare a variable to which I can attach an object in the inspector (and avoid hard-coding the object name), yet access it in a different script without using Find/GetComponent?</p>
