unity3dText渐变效果
效果
代码
using UnityEngine;
using System.Collections.Generic;
using UnityEngine.UI;
using System;
namespace Kola {
[AddComponentMenu("UI/Kola/UIEffectGradientColor")]
[ExecuteInEditMode]
#if !UNITY_5_1
public class UIEffectGradientColor : BaseMeshEffect {
List<UIVertex> vertices = new List<UIVertex>();
public override void ModifyMesh(VertexHelper vh) {
vertices.Clear();
vh.GetUIVertexStream(vertices);
float topX = 0f, topY = 0f, bottomX =