mirror of
https://github.com/tym1116/BH3.git
synced 2025-12-12 22:44:35 +01:00
22 lines
336 B
C#
22 lines
336 B
C#
using UnityEngine;
|
|
|
|
namespace MoleMole
|
|
{
|
|
[RequireComponent(typeof(Camera))]
|
|
public class InvertCameraCulling : MonoBehaviour
|
|
{
|
|
private bool _oldCulling;
|
|
|
|
public void OnPreRender()
|
|
{
|
|
_oldCulling = GL.invertCulling;
|
|
GL.invertCulling = true;
|
|
}
|
|
|
|
public void OnPostRender()
|
|
{
|
|
GL.invertCulling = _oldCulling;
|
|
}
|
|
}
|
|
}
|