Search Unity

SetPropertyBlock on SpriteRenderer breaks alpha?

Discussion in 'Editor & General Support' started by Breakmachine, Nov 13, 2013.

  1. Breakmachine

    Breakmachine

    Joined:
    Sep 19, 2009
    Posts:
    39
    I have a sprite with alpha and I'm using the default sprite material.

    If I set the "_Color" property using renderer.material.SetColor("_Color", new Color(1,1,1,x)) it looks fine.

    But when I do the same thing using SetPropertyBlock it fills the whole mesh/quad with the color overwriting the sprite bitmap.