Why is the SpriteRenderer color not updating at runtime?
<p>I have a <code>GameObject</code> with a <code>SpriteRenderer</code> and its default color is set to white. At runtime I'm setting the color to <code>Color.gray</code> and for some reason it is not updating at runtime to the new <code>gray</code> tint. I have confirmed that the objects in my script are correct because the sprite completely disappears if I set <code>enabled</code> to false and if I have the object selected in the editor and play, the color changes in the <code>Inspector</code> but does not update in the <code>Game View</code>.</p>

<p>This is my simple script</p>

<pre><code>public class GameManager : MonoBehaviour
{
    public SpriteRenderer Player1;
    public SpriteRenderer Player2;

    public void SetTurn(bool isPlayer1)
    {
        this.Player1.color = Color.gray;
        this.Player2.color = Color.gray;

        if (isPlayer1)
            this.Player1.color = Color.white;
        else
            this.Player2.color = Color.white;
    }
}
</code></pre>

<p><code>SetTurn</code> is being called from a different script in its <code>Update</code> on a mouse click; I have verified that the function is actually running. I've also tried simplifying this to:</p>

<pre><code>public class GameManager : MonoBehaviour
{
    public SpriteRenderer Player1;
    public SpriteRenderer Player2;

    private void Update()
    {
        this.Player1.color = Color.red;
    }
}
</code></pre>

<p>That doesn't even work. There are no warnings and no errors in the console either. I've tried rebooting, rebuilding, quitting and restarting, running on a different machine and running on a completely different platform... nothing works.</p>

<p>Any idea what I'm doing wrong? Again, the color changes in the <code>Inspector</code> at runtime but does not in the <code>Game View</code>. Also, if I change the color manually in the <code>Inspector</code> at runtime the <code>Game View</code> does change color, it just refuses to do it from the script.</p>

<p><strong>EDIT</strong></p>

<p>I've also tried using <code>Color32</code> just to cover my bases and that doesn't work, as I expected it wouldn't.</p>

<p><strong>UPDATE</strong></p>

<p>I completely removed the script and made a new script that I attached directly to the <code>GameObject</code> itself and that doesn't even work.</p>

<pre><code>public class test : MonoBehaviour
{
    private SpriteRenderer m_Renderer;

    void Start()
    {
        this.m_Renderer = this.GetComponent&lt;SpriteRenderer&gt;();
    }

    void Update()
    {
        this.m_Renderer.color = Color.black;
        Debug.Log("COLOR BLACK");
    }
}
</code></pre>

<p>The console displays "COLOR BLACK" so I know the Update is being called but still no color change in <code>Game View</code> or <code>Scene View</code> but it does change in the <code>Inspector</code></p>

<p><strong>UPDATE 2</strong></p>

<p>I narrowed it down but still haven't solved it. I'm using the 2d experimental build <code>5.5.0a6</code>. I installed the current stable version <code>5.4.2f2</code> and the problem does not exist! So, the problem has something to do with the <code>SpriteRenderer</code> in version <code>5.5.0a6</code>. I'm trying to find out what the issue is, and I hope this gets fixed soon.</p>

<p><strong>UPDATE 3</strong>
Here is a link to 2 simple projects that illustrate the issue. One for version 5.5.0a6 which DOES contain the issue and the exact same project for version 5.4.2f2 which DOES NOT contain the issue.</p>

<p><a href="https://drive.google.com/open?id=0By5d2e2jSbmJdjQ5eWFpOXE2bzA" rel="nofollow noreferrer" title="Sample Projects">Sample Projects</a></p>