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 = 0f, bottomY = 0f;
for (int i= 0; i < vertices.Count; ++i) {
UIVertex vertex = vertices[i]

本文介绍了如何在Unity3D中为Text创建渐变效果,包括展示的效果图片和实现这一效果的关键代码片段。
最低0.47元/天 解锁文章
1596

被折叠的 条评论
为什么被折叠?



