페이드인
-
[UI] 이미지를 이용한 페이드 아웃Unity(유니티) 2022. 8. 31. 09:31
using System.Collections; using System.Collections.Generic; using UnityEngine; public class Fade : MonoBehaviour { public UnityEngine.UI.Image fade; float fades = 0.1f; float time = 0.0f; // Update is called once per frame void Update() { time += Time.deltaTime; if (fades = 0.1f) { fades += 0.02f; fade.color = new Color(0, 0, 0, fades); time = 0; } } } UI 이미지를 삽입하고 deltaTime 값에 비..