JBooth.VertexPainterPro.VertexPainterWindow.InitColors C# (CSharp) Method

InitColors() public method

public InitColors ( PaintJob j ) : void
j PaintJob
return void
        void InitColors(PaintJob j)
        {
            Color[] colors = j.stream.colors;
             if (colors == null || colors.Length != j.verts.Length)
             {
            Color[] orig = j.meshFilter.sharedMesh.colors;
            if (j.meshFilter.sharedMesh.colors != null && j.meshFilter.sharedMesh.colors.Length > 0)
            {
               j.stream.colors = orig;
            }
            else
            {
               j.stream.SetColor(Color.white, j.verts.Length);
            }
             }
        }