Skip to content

Instantly share code, notes, and snippets.

@pacoelayudante
Created April 10, 2017 22:20
Show Gist options
  • Save pacoelayudante/7000db83d57a097713031292d2581487 to your computer and use it in GitHub Desktop.
Save pacoelayudante/7000db83d57a097713031292d2581487 to your computer and use it in GitHub Desktop.
In Unity, some devices do not clear properly in areas where no viewport is rendering. Adding this to anycamera fixes it (check the depth too)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ClearFullScreen : MonoBehaviour {
private void OnPreCull()
{
GL.Clear(true,true,Color.black,0);//1);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment