Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Graphics Mesh.SetColors(List<Color>) does not work correctly (Mesh.SetColors(List<Color32>) does)

Discussion in '5.2 Beta' started by Simie, Aug 8, 2015.

  1. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    I have some code that is setting vertex colors with a List<Color>(). This was resulting in an incorrect colour, and a small change in the color inspector would result in a huge change in the on-screen output. I switched the List to List<Color32> so it uses the List<Color32> overload for Mesh.SetColors (no change to the rest of the code, as Color casts to Color32 implicitly) and the colours appeared correctly.