Uni Fader by gok11 - 2


UniFader is a transition helper components for Unity.

Unity 2019.3.0b12MIT LicenseUpdated 17 days agoCreated on November 21st, 2019
Go to source

UniFader GitHub license

UniFader is a transition helper components for Unity.

Supported Unity versions

Unity 2019.3 or higher.

Quick Start

  1. Download UniFader.unitypackage from releases page and import it.
  2. You can transition scene by calling only UniFader.Instance.LoadSceneWithFade(0).
  3. Enjoy!


Samples can be seen in Sample folder if you want.


You can use two transition types - Color Fade and Gradient Mask Fade.

Fade Pattern Feature Screenshot
Color Fade Simple color fade effect. You can set base color from Background Color. ColorFade
Gradient Mask Fade Transition with gradient gray scaled texture. GradientMaskFade

Usage for Mask Gradient Fade

  1. Download UniFader.unitypackage from releases page and import it.

  2. Create new GameObject and add UniFader component from Add Component in inspector.

  3. Change Fade Pattern to MaskGradientFade

  4. Set Transition Material from Assets/UniFader/Materials/UI_GradientMaskTransition.mat.

  5. Set Mask Texture from and Assets/UniFader/Sample/Textures/SampleGradientMasks.

  6. Play!

Transition options


Edit easing from Fade Out Curve and Fade In Curve.

Fade Out In Mode (Gradient Mask Fade only)

Invert Yoyo
Repeat twice
Repeat invert twice



Used As Instance

If this is enabled, the fader will be singleton instance. It is referenced from UniFader.Instance and it will be set DontDestroyOnLoad.

Add fade pattern

You can add Fade Pattern by implementing IFadePattern.

using MB.UniFader;
using UnityEngine;
using UnityEngine.UI;

public class TestFade : IFadePattern
    [SerializeField] private int hoge;
    [SerializeField] private Color fuga;

    public void Initialize(Image targetImage) { }

    public void ExecFade(float progress, bool fadeOut) { }

After that, you can select that pattern in Fade Pattern in inspector.


Add callback

You can add callback from inspector (On Fade Out / In) or script. If you add callback for FadeOut, you can write as follows.

using System.Collections;
using UnityEngine;
using MB.UniFader;

public class FadeTest : MonoBehaviour
    void Start()
        UniFader.Instance.FadeOut(() =>
            Debug.Log("FadeOut completed!");


  • MIT
  • © UTJ/UCL



Show all projects by gok11