您当前的位置: 首页 >  ui

染指流年灬

暂无认证

  • 3浏览

    0关注

    194博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

[UGUI进阶知识十五]图片渐变色

染指流年灬 发布时间:2022-01-14 14:42:52 ,浏览量:3

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

/// 
/// UI渐变特效,继承BaseMeshEffect函数
/// 
public class GradientEffect : BaseMeshEffect
{
	//设置渐变色
	public Color topColor = Color.white;
	public Color botttomColor = Color.white;

	//重写ModifyMesh函数
	public override void ModifyMesh(VertexHelper vh)
	{
		int count = vh.currentVertCount;
		if (count == 0)
		{
			return;
		}

		List vertexs = new List();
		for (int i = 0; i             
关注
打赏
1665909078
查看更多评论
0.0391s