Skip to content

Instantly share code, notes, and snippets.

@orlax
Created February 23, 2020 17:06
Show Gist options
  • Save orlax/d95202ffc50ce015f386848934fccfa9 to your computer and use it in GitHub Desktop.
Save orlax/d95202ffc50ce015f386848934fccfa9 to your computer and use it in GitHub Desktop.
Fix to GameManager.cs on the CorgiEngine to get UICamera working propertly on the LWRP Unity 2019.1.1f1
// inside the public virtual void Pause() function on line 270 aprox,
//we add the following code ad the proper pause and unpause logic blocks.
var mainCamera = GameObject.FindGameObjectWithTag("MainCamera");
if (mainCamera != null)
{
var cam = mainCamera.GetComponent<Camera>();
cam.depth = -1; //-1 when pausing, 1 when unpausing.
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment