Decompiled source of RemoveCameraFilter v1.0.0

BepInEx/plugins/RemoveCameraFilter.dll

Decompiled 12 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using UnityEngine;
using UnityEngine.Rendering.HighDefinition;
using UnityEngine.SceneManagement;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("RemoveCameraFilter")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("RemoveCameraFilter")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("8119b276-5c2c-446f-a321-72045794dc73")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace RemoveCameraFilter;

[BepInPlugin("kruumy.RemoveCameraFilter", "Remove Camera Filter", "1.0.0")]
public class Main : BaseUnityPlugin
{
	private void Awake()
	{
		SceneManager.activeSceneChanged += SceneManager_activeSceneChanged;
	}

	private void SceneManager_activeSceneChanged(Scene arg0, Scene arg1)
	{
		Object[] array = Object.FindObjectsOfTypeAll(typeof(CustomPassVolume));
		foreach (Object obj in array)
		{
			CustomPassVolume val = (CustomPassVolume)(object)((obj is CustomPassVolume) ? obj : null);
			if (val != null)
			{
				((Behaviour)val).enabled = false;
				val.isGlobal = false;
			}
		}
	}
}