This script delegates the rendering of fade effects to Unity UI, instead of the OnGUI method used by the MainCamera. Since OnGUI is always drawn on top of everything else, using Unity UI gives you finer control over what can be drawn on top of any fading effect.
Note: AC v1.68.0 or newer is required for this script to work.
- In your game's first scene, create a new UI Canvas, with a RawImage component that spans the screen.
- Attach a Canvas Group component to the Canvas
- Copy the script below into a C# script named FadeUI.cs
- Attach the new Fade UI component to the Canvas, and assign the two fields in its Inspector
- Select your scene's MainCamera, and uncheck Draw fade?. Repeat this for all of your MainCameras, or update the linked prefab.
public class FadeUI : MonoBehaviour
[SerializeField] private RawImage rawImage = null;
[SerializeField] private CanvasGroup canvasGroup = null;
private void Awake ()
private void Update ()
if (KickStarter.settingsManager.IsInLoadingScene ())
canvasGroup.alpha = 1f;
if (KickStarter.mainCamera != null)
canvasGroup.alpha = KickStarter.mainCamera.GetFadeAlpha ();
rawImage.texture = KickStarter.mainCamera.GetFadeTexture ();