title: Unity3d MeshRender
body: <p>I'm trying to use C# to disable and enable the <code>MeshRender</code> component in Unity3d however I am getting the following error,</p>
  
  <blockquote>
    <p>error CS0120: An object reference is required to access non-static member `UnityEngine.GameObject.GetComponent(System.Type)'</p>
  </blockquote>
  
  <p>The line of code I am using is below. I'm using this in the same function. </p>
  
  <pre><code>MeshRenderer showZone = GameObject.GetComponent&lt;MeshRenderer&gt;();
  </code></pre>
  
  <p>Also I'm posting here rather than Unity Answers as I get a far faster response here and it's always useful information regardless of the outcome. </p>