title: Cannot modify a value type return value of `UnityEngine.Material.color' for changing alpha of gameobject
body: <p>I'm having trouble with this, although this is just for improvement for my code I can make the gameobject change it's alpha I just want it simpler.</p>
  
  <p>here is my code:</p>
  
  <pre><code>SpriteRenderer go;
  Color colora;
  float x = 0f;
  void Start () {
      go = GetComponent&lt;SpriteRenderer&gt; ();
  
  
  }
  
  // Update is called once per frame
  void Update () {
      colora = new Color(255f,255f,255f,.5f);
      go.material.color.a = colora.a;
  }
  </code></pre>
  
  <p>this is the error one. just to make this code simpler.</p>