Преглед на файлове

Fix fog effect manager never being ready

Ready was never set during activation. This resulted in the associating
effect pane from updating the controls.
habeebweeb преди 4 години
родител
ревизия
f3de7363a7
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. 2 1
      COM3D2.MeidoPhotoStudio.Plugin/MeidoPhotoStudio/Managers/EffectManagers/FogEffectManager.cs

+ 2 - 1
COM3D2.MeidoPhotoStudio.Plugin/MeidoPhotoStudio/Managers/EffectManagers/FogEffectManager.cs

@@ -6,7 +6,7 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
     {
         public const string header = "EFFECT_FOG";
         private GlobalFog Fog { get; set; }
-        public bool Ready { get; }
+        public bool Ready { get; private set; }
         public bool Active { get; private set; }
         private readonly float initialDistance = 4f;
         private readonly float initialDensity = 1f;
@@ -96,6 +96,7 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
         {
             if (Fog == null)
             {
+                Ready = true;
                 Fog = GameMain.Instance.MainCamera.GetOrAddComponent<GlobalFog>();
                 if (Fog.fogShader == null) Fog.fogShader = Shader.Find("Hidden/GlobalFog");
                 Distance = initialDistance;