Skip to content

Instantly share code, notes, and snippets.

@DenL DenL/Tint.cs
Created May 15, 2015

What would you like to do?
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.UI;
namespace MochiLabs.UI.Effects {
public class Tint : BaseVertexEffect {
private Color32 tintColor = new Color32(225,225,225,255);
public override void ModifyVertices(List<UIVertex> vertexList) {
if (!IsActive())
int count = vertexList.Count;
for (int i = 0; i < count; i++) {
UIVertex uiVertex = vertexList[i];
uiVertex.color = (Color)uiVertex.color * (Color)tintColor;
vertexList[i] = uiVertex;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.