參考來源:https://answers.unity.com/questions/881620/uigraphiccrossfadealpha-only-works-for-decrementin.html http://www.vr910.com/forum.php?mod=viewthread&tid=5530
提示: 不需要用timer
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class LogoDisappear : MonoBehaviour {
public Image image;
private Image logo;
private float Timer = 0f;
public float Countdown = 5f;
void Start() {
logo = image.GetComponent<Image>();
logo.canvasRenderer.SetAlpha(1.0f);
logo.CrossFadeAlpha(0.0f, 10.0f, false);
Debug.Log("<color=blue>" + "fade out" + "</color>" );
}
}