【Unity】透明度渐变
写给美术大佬的脚本,还要继续改,github地址: TransEffect【github】 效果图如下: Ver.1源码,针对3d Object: using System.Collections; using System.Collections.Generic; using UnityEngine; public class TransEffect : MonoBehaviour { public List<GoInfo> GoList; public float varifySpeed = 0.5f; public float aTime = 5f;//每个物体保持出现的时间 public float dTime = 5f; private float minAlpha = 0.0f; private float maxAlpha = .9f; private float curAlpha = 1.0f; private float nextAlpha = 0.0f; private int i = 0; public void OnEnable() { LoadGo(); } // Use this for initialization void Start() { //初始化全List隐形 foreach (GoInfo go in GoList) { Color c =