Browse Source

Made filter removing disabled by default

Bepis 7 years ago
parent
commit
b2eafe1a72
1 changed files with 9 additions and 15 deletions
  1. 9 15
      Plugins/ColorCorrector/ColorCorrector.cs

+ 9 - 15
Plugins/ColorCorrector/ColorCorrector.cs

@@ -10,13 +10,20 @@ namespace ColorCorrector
 {
     public class ColorCorrector : BaseUnityPlugin
     {
-        public override string Name => "Color Corrector";
+        public override string Name => "Color Filter Remover";
         
         AmplifyColorEffect component;
 
         protected override void LevelFinishedLoading(Scene scene, LoadSceneMode mode)
         {
-            DisableEffects();
+            if (Camera.main != null && Camera.main?.gameObject != null)
+            {
+                var c = Camera.main.gameObject.GetComponent<AmplifyColorEffect>();
+                if (c != null)
+                {
+                    component = c;
+                }
+            }
         }
 
         void Update()
@@ -31,18 +38,5 @@ namespace ColorCorrector
         {
             component.enabled = !component.enabled;
         }
-
-        void DisableEffects()
-        {
-            if (Camera.main != null && Camera.main?.gameObject != null)
-            {
-                var c = Camera.main.gameObject.GetComponent<AmplifyColorEffect>();
-                if (c != null)
-                {
-                    component = c;
-                    component.enabled = false;
-                }
-            }
-        }
     }
 }