mirror of
https://github.com/BepInEx/BepInEx.git
synced 2026-10-20 01:46:13 +00:00
Merge pull request #3 from geneishouko/remove_bloom
disable bloom effect in color corrector plugin
This commit is contained in:
3 files changed
+19
-10
No files matched your search
@@ -41,7 +41,11 @@
|
||||
</Reference>
|
||||
<Reference Include="Assembly-CSharp, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>D:\koikatu\KoikatuTrial_Data\Managed\Assembly-CSharp.dll</HintPath>
|
||||
<HintPath>..\lib\Assembly-CSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Assembly-CSharp-firstpass, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\lib\Assembly-CSharp-firstpass.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
@@ -71,4 +75,4 @@
|
||||
</ItemGroup>
|
||||
<Import Project="..\BepInEx.Common\BepInEx.Common.projitems" Label="Shared" />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
</Project>
|
||||
@@ -5,6 +5,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityStandardAssets.ImageEffects;
|
||||
|
||||
namespace ColorCorrector
|
||||
{
|
||||
@@ -12,17 +13,15 @@ namespace ColorCorrector
|
||||
{
|
||||
public override string Name => "Color Filter Remover";
|
||||
|
||||
AmplifyColorEffect component;
|
||||
AmplifyColorEffect amplifyComponent;
|
||||
BloomAndFlares bloomComponent;
|
||||
|
||||
protected override void LevelFinishedLoading(Scene scene, LoadSceneMode mode)
|
||||
{
|
||||
if (Camera.main != null && Camera.main?.gameObject != null)
|
||||
{
|
||||
var c = Camera.main.gameObject.GetComponent<AmplifyColorEffect>();
|
||||
if (c != null)
|
||||
{
|
||||
component = c;
|
||||
}
|
||||
amplifyComponent = Camera.main.gameObject.GetComponent<AmplifyColorEffect>(); ;
|
||||
bloomComponent = Camera.main.gameObject.GetComponent<BloomAndFlares>();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +35,10 @@ namespace ColorCorrector
|
||||
|
||||
void ToggleEffects()
|
||||
{
|
||||
component.enabled = !component.enabled;
|
||||
amplifyComponent.enabled = !amplifyComponent.enabled;
|
||||
bloomComponent.enabled = !bloomComponent.enabled;
|
||||
Console.WriteLine($"Amplify Filter Enabled: {amplifyComponent.enabled}");
|
||||
Console.WriteLine($"Bloom Filter Enabled: {bloomComponent.enabled}");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -34,6 +34,9 @@
|
||||
<HintPath>..\..\lib\Assembly-CSharp.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Assembly-CSharp-firstpass">
|
||||
<HintPath>..\..\lib\Assembly-CSharp-firstpass.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
@@ -57,4 +60,4 @@
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
</Project>
|
||||
Reference in new issue
Block a user