Search Unity

Fog of War

Discussion in 'Assets and Asset Store' started by stu_pidd_cow, Oct 11, 2016.

  1. crocodilepp

    crocodilepp

    Joined:
    Apr 1, 2013
    Posts:
    1
    I'm running URP + WebGL and got some problems.
    Unity version is 2021.3.2f1

    1. In the FogOfWarURP shader, target shader model is 4.5
    Code (CSharp):
    1. pragma target 4.5
    I have to change it to 3.5, otherwise it will pop this error
    Code (CSharp):
    1. Fog Of War: The following shader is not supported: Hidden/FogOfWarURP
    Is there any features from shader model 4.0+ being used? Since WebGL 2.0 only supports OpenGL ES 3.0, I'm guessing targeting beyond 3.5 won't work for WebGL

    2. Once I changed #pragma target 4.5 to 3.5, there's still no fog when running in Firefox firefox.png
    However when running in Chrome, I can see fog but whole screen turns upside-down
    chrome.png

    Any help would be appreciated.
     
  2. stu_pidd_cow

    stu_pidd_cow

    Joined:
    Aug 4, 2014
    Posts:
    233
    I believe I've fixed this issue but it hasn't been released yet. Could you send me an email (you can find it on the asset store page or in the user guide) and I'll send you an updated unitypackage.
     
  3. betaFlux

    betaFlux

    Joined:
    Jan 7, 2013
    Posts:
    112
    Greetings! I encountered a little issue. In Unity 2022.1.0f1 with URP 13.1.8, as soon as I add the FogOfWarURPFeature I get spammed with following error:


    You can only call cameraColorTarget inside the scope of a ScriptableRenderPass. Otherwise the pipeline camera target texture might have not been created or might have already been disposed.
    UnityEngine.Rendering.Universal.ScriptableRenderer:get_cameraColorTarget ()
    FoW.FogOfWarURPFeature:AddRenderPasses (UnityEngine.Rendering.Universal.ScriptableRenderer,UnityEngine.Rendering.Universal.RenderingData&) (at Assets/FogOfWar/Core/URP/FogOfWarURPFeature.cs:17)
    UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)


    I can still enter play mode, but seeing this red line all the time freaks me out! :) I guess it's a compatibility issue?
     
  4. stu_pidd_cow

    stu_pidd_cow

    Joined:
    Aug 4, 2014
    Posts:
    233
    Thanks for pointing this out!
    I have a fix for this. Could you send me an email (you can find it on the asset store page or in the user guide) and I'll send you a unity package with the fix.
     
  5. betaFlux

    betaFlux

    Joined:
    Jan 7, 2013
    Posts:
    112
    Sent! Thank you for your support and this great, reliable asset!
     
    stu_pidd_cow likes this.
  6. dmit0820

    dmit0820

    Joined:
    Jun 28, 2021
    Posts:
    3
    Thanks for the awesome asset! I am having one issue though. When using URP and building for the Quest 2 it gets stuck at the Unity logo, which flashes and is frozen in place. It works in the editor and on the Quest 2 when I switch from multi-view to multi-pass, but multi-pass is very slow and has it's own issues. I've tried both hardware and software mode and still no luck getting it to work with multi-view. Any ideas?
     
  7. stu_pidd_cow

    stu_pidd_cow

    Joined:
    Aug 4, 2014
    Posts:
    233
    I've had trouble with multi-pass in the past, but last I heard it was working (although performance may be worse).
    Are you able to see logs of what is happening?
     
  8. stu_pidd_cow

    stu_pidd_cow

    Joined:
    Aug 4, 2014
    Posts:
    233
    There appears to be a compatability issue with Unity 2021.3+ in URP when using SSAO or Screenspace Shadows. Turning these off on the Universal Render Data will make Fog Of War work properly. I'm currently looking into a fix for the issue.
     
    Rodakai likes this.
  9. dmit0820

    dmit0820

    Joined:
    Jun 28, 2021
    Posts:
    3
    Here's the error that comes up and a related thread, it looks like it's Oculus specific and possibly related to an OnGui call. I'm using Unity 2020.3.34. Maybe there's some kind of work around?

    Edit: On Vulcan it starts without error and the profiler shows everything is running, although the screen is grey.
     

    Attached Files:

    Last edited: May 26, 2022
  10. stu_pidd_cow

    stu_pidd_cow

    Joined:
    Aug 4, 2014
    Posts:
    233
    Interesting. As far as I can tell from some dead end forum posts, it looks like this might be on unity's end.

    Could you try using a different renderer? You can do this in Player Settings > Other Setting and changing the order of items in the Graphics API list.

    Unfortunately, I don't have a Quest 2 to test this so I can't do this myself :(
     
  11. dmit0820

    dmit0820

    Joined:
    Jun 28, 2021
    Posts:
    3
    On OpenGLES2 it has a black screen and this error:
    OpenGLES2.PNG
    On OpenGLES3 it has a black screen and this error:
    OpenGLES3.PNG
    On Vulcan everything seems to be working according to the profiler and there are no errors, but the screen is completely gray. I notice a significant FPS increase when I look up(away from all the units), so presumably they're being rendered but are not visible.
     
  12. endseeker2

    endseeker2

    Joined:
    May 19, 2021
    Posts:
    2
    when you draw on the hardware, there is a step to read from the render texture then do the fade and blur on CPU, reading from the renderer is very slow, if you dont have to read from the renderer and do everything on the GPU this will be much faster.
    upload_2022-5-26_17-30-56.png
     
  13. bugcamper

    bugcamper

    Joined:
    Mar 15, 2022
    Posts:
    11
    the Semaphore.WaitForSignal is huge chunk of time, @stu_pidd_cow I hope you will find time to optimize it.
     
    Last edited: May 27, 2022
  14. stu_pidd_cow

    stu_pidd_cow

    Joined:
    Aug 4, 2014
    Posts:
    233
    Semaphore.WaitForSignal is a symptom of the issue, rather than the issue itself.

    Yes, this is currently an issue for hardware mode but is required due to the CPU needing to query the fog texture (usually by FogOfWarUnit to test for visibility). I'm currently working on a solution that erradicates this, but it will require a rewrite of some of the more complex areas of the system.
    In the meantime, I recommend sticking to software mode, or keeping your Map Resolution as low as possible. You should also disable Output To Texture for any FogOfWarTeams that are not currently visible.
     
    bugcamper likes this.
  15. stu_pidd_cow

    stu_pidd_cow

    Joined:
    Aug 4, 2014
    Posts:
    233
    This OpenGLES2 error sounds promising. According to here, depth buffers aren't supported on RenderTextures. This should be easy to test. Could you try the following:
    1. Remove any FogOfWarClearFog scripts in the scene.
    2. Go to FogOfWarDrawerHardware.cs and change the following line in OnInitialise() from:
      Code (CSharp):
      1. _renderTexture = new RenderTexture(_map.resolution.x, _map.resolution.y, 16, RenderTextureFormat.ARGB32);
      to:
      Code (CSharp):
      1. _renderTexture = new RenderTexture(_map.resolution.x, _map.resolution.y, 0, RenderTextureFormat.ARGB32);
    Hopefully that will fix the issue. I'll try to come up with a better solution for the clear fog in the meantime.
     
  16. Kairge

    Kairge

    Joined:
    Jul 19, 2016
    Posts:
    1
    upload_2022-6-5_12-31-55.png
    in 2020.3.18f ,urp upload_2022-6-5_12-32-31.png ,and just like this
     
  17. stu_pidd_cow

    stu_pidd_cow

    Joined:
    Aug 4, 2014
    Posts:
    233
    I have tested with 2020.3.34f1 and it appears to work fine. Could you send me an email and I'll try sending you general fix that may rectify this?
     
  18. schorsch_unity

    schorsch_unity

    Joined:
    May 9, 2022
    Posts:
    1
    Since there is still no officially released fix, you can fix it by applying the following changes (in version 1.24):

    Code (CSharp):
    1. Index: Assets/FogOfWar/Core/URP/FogOfWarURPFeature.cs
    2. ===================================================================
    3. diff --git a/Assets/FogOfWar/Core/URP/FogOfWarURPFeature.cs b/Assets/FogOfWar/Core/URP/FogOfWarURPFeature.cs
    4. --- a/Assets/FogOfWar/Core/URP/FogOfWarURPFeature.cs    (revision original)
    5. +++ b/Assets/FogOfWar/Core/URP/FogOfWarURPFeature.cs    (date 1660475479570)
    6. @@ -14,7 +14,7 @@
    7.          public override void AddRenderPasses(ScriptableRenderer renderer, ref RenderingData renderingData)
    8.          {
    9. -            _fowPass.Setup(renderer.cameraColorTarget);
    10. +            // _fowPass.Setup(renderer.cameraColorTarget);
    11.              renderer.EnqueuePass(_fowPass);
    12.          }
    13.      }
    14. Index: Assets/FogOfWar/Core/URP/FogOfWarURPPass.cs
    15. ===================================================================
    16. diff --git a/Assets/FogOfWar/Core/URP/FogOfWarURPPass.cs b/Assets/FogOfWar/Core/URP/FogOfWarURPPass.cs
    17. --- a/Assets/FogOfWar/Core/URP/FogOfWarURPPass.cs    (revision original)
    18. +++ b/Assets/FogOfWar/Core/URP/FogOfWarURPPass.cs    (date 1660477145891)
    19. @@ -100,6 +100,7 @@
    20.              CommandBuffer cmd = CommandBufferPool.Get("FogOfWarURP");
    21. +            _postProcess.sourceTarget = renderingData.cameraData.renderer.cameraColorTargetHandle.nameID;
    22.              _postProcess.Setup(cmd, ref context, ref renderingData);
    23.              _postProcess.team = _fowURP.team.value;
    24.              _postProcess.camera = renderingData.cameraData.camera;
    25.  
     
  19. Philipp3p

    Philipp3p

    Joined:
    Nov 15, 2017
    Posts:
    3
    Is there any way to make a fog of war similar to the one in the image? (as if it were smoke)

     
    Last edited: Mar 2, 2023
  20. stu_pidd_cow

    stu_pidd_cow

    Joined:
    Aug 4, 2014
    Posts:
    233
    I think the best way to achieve this would be to have a slightly grey-colored fog, and on the FogOfWarUnit component, have a large radius with a small inner radius (so that there is more falloff). You can also experiment with the clear fog functionality to have a more non-uniform smokey look.
     
  21. DwinTeimlon

    DwinTeimlon

    Joined:
    Feb 25, 2016
    Posts:
    300
    Is there a way to set a specific fog value for a shape (e.g. I have a hex shape using a texture) instead of just bounds like in FogOfWarTeam.SetFog?
     
  22. stu_pidd_cow

    stu_pidd_cow

    Joined:
    Aug 4, 2014
    Posts:
    233
    Are you talking about the brightness of the shape, or the shape itself?
    There is the Brightness slider on the FogOfWarUnit component to adjust that.
    For the shape, you can input a single channel texture into the Texture field on the FogOfWarUnit component.
    upload_2023-3-28_10-36-58.png
     
  23. DwinTeimlon

    DwinTeimlon

    Joined:
    Feb 25, 2016
    Posts:
    300
    Thanks. I am aware of this. I was looking for a function which clears fog from 255 down to a certain value without using a FogOfWarUnit like the SetFog function in FogOfWarTeam, but using a texture or a mesh.
     
  24. stu_pidd_cow

    stu_pidd_cow

    Joined:
    Aug 4, 2014
    Posts:
    233
    There's nothing to do this out of the box. I'd recommend just instantiating a FogOfWarUnit and placing it where you want. You can hide it again after a single frame to reuse it for later.
    If you still want to go the code route, you can modify the code in FogOfWarTeam.ProcessUnits() (especially where it calls FogOfWarUnit.GetShape()). You would want to create your own FogOfWarShape to send to the drawer. Feel free to email me if you want help with it.
     
  25. stu_pidd_cow

    stu_pidd_cow

    Joined:
    Aug 4, 2014
    Posts:
    233
    FogOfWar v1.25 has been uploaded to the asset store! It's been a while, but hopefully worth the wait.

    This is by far the largest update to date! The focus has mostly been on performance (up to 65% faster!), hardware mode features, new styling options, as well as new editor for auto-installing and resolving installation issues.

    The full list of features are:
    • Fixed android URP displaying upside down
    • Fixed sensitivity of demo scenes on touch devices
    • Fixed FogOfWarURP shader not working with older hardware
    • Fixed OverflowException when setting FogOfWarUnit.lineOfSightRaycastCount <= 0
    • Added HideInFog script to 3D sample opponent units
    • Fixed misleading documentation for FogOfWarTeam.ManualUpdate()
    • Fixed demo scene now loading legacy scenes
    • Fixed FogOfWarTeam.GetVisibleUnits() iterating through the wrong unit list
    • Fixed compile errors for unity versions earlier than Unity 2018
    • Fixed warning from Unity 2021.2
    • Renamed FogOfWarUnit.lineOfSightRaycastOffset to lineOfSightRaycastAngleOffset
    • Simplified demo sample scenes so they work with all render pipelines
    • Put URP and HDRP into unitypackages to avoid compile errors after installing
    • Fixed FogOfWarEvents OnFogEnter and OnFogExit doing the opposite
    • Added height range for fog on all axes
    • Fixed HDR not applying when FogOfWar is enabled
    • Fixed major thread leak when using multithreading
    • Automatically set UniversalRendererData.intermediateTextureMode to Always for Unity 2021.2
    • Fixed URP cameraColorTarget error in Unity 2020.2
    • Removed depth buffer requirement for hardware mode
    • Removed SV_VertexID shader dependency
    • Added FogOfWarChunkManager.GetFogValue()
    • Fixed some incorrect chunk position calculations in FogOfWarChunkManager
    • Fixed stack overflow with FogOfWarTeam.GetCurrentFogValues()
    • Fixed RaycastCommand warning in 2022.2
    • Put FogOfWarTeamEditor in FoW namespace
    • Added gizmo toggles for FogOfWarUnit and made them work in edit mode
    • Renamed FogOfWarUnit's offset to centerPoint, and absoluteOffset to absoluteCenterPoint
    • Renamed FogOfWarTeam's filterMode to lineOfSightAntiAliasing
    • Replaced rendering component's pointFiltering with a FogOfWarStyle enum
    • Renamed FogOfWarTeam Multithreading header to Performance
    • FogOfWarTeam now separates visible and partial fog textures (final texture has been removed as it is up to the renderer to decide how they are merged)
    • Removed FogOfWarTeam.blurAmount because it is now being automatically calculated
    • Replaced old fog fading animation with a new performant system (combines FogOfWarTeam's fogInDuration and fogOutDuration into fogDuration)
    • FogOfWarUnit's shape texture respects the texture filtering
    • Added visibilityType to FogOfWarEvents
    • Added visibilityType to HideInFog
    • Added separate colors for fog, partial and visible on FogOfWarMinimap
    • Merged FogOfWarTeam's Get*FogValues()/Set*FogValues()/Get*FogValue() into GetFogValues()/SetFogValues()/GetFogValue() which lets you specify the source
    • Hardware mode now has feature parity with Software mode, and is no longer considered experimental
    • Fixed some inconsistencies between FogOfWarUnit's absoluteCenterPoint and rotateToForward
    • Fixed some inconsistencies between FogOfWarUnit's boxSize and circleRadius when dealing with mesh shapes
    • Added property drawers to enable/disable relevant fields
    • Added support for URP 2D renderer
    • Added warning message when using unsupported FogOfWarUnit.texture with multithreading
    • Added vertex color support to FogOfWarUnit mesh shapes in hardware mode only
    • Added warning and auto fix when SSAO is enabled with URP
    • Added FogOfWarSetup window to automate installation and debugging issues in the scene
    • Big improvements to general error checking
    • Renamed HideInFog component to FogOfWarHideInFog
    • Greatly reduced GPU -> CPU readback, and added FogOfWarTeam.cpuFogValues
    • Added FogOfWarUnit.cellTestPoint to specify how cell-based cell visilibility is tested
    • Made FogOfWarUnit cell-based line of sight support physics 3D and non-XY planes
    • Added output texture display in FogOfWarTeam inspector at runtime
    Remember to delete your previous FogOfWar folder before installing, and read the user guide on how to install it, as there is now a new setup editor.

    It may take a few days for the asset store to publish the asset. If you need it sooner, feel free to send me an email.
     
  26. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,129
    Hi. Any plan to further improve performance to next level using burst or even better using full unity dots tech?
     
    DwinTeimlon and FlightFight like this.
  27. stu_pidd_cow

    stu_pidd_cow

    Joined:
    Aug 4, 2014
    Posts:
    233
    It's something I would like to look into, but I don't think it would have as big of an impact as you might expect.
    The bulk of the performance issues are on the rendering side (especially so with software mode). The rest is in gathering the shape data from the units, which is already quite fast but could be improved a bit with burst/dots.
     
  28. NHNminiyume

    NHNminiyume

    Joined:
    Jul 1, 2021
    Posts:
    5
    Updated new version. Unity version is 2021.3.9f1.
    I opened it as a URP project, but the following error remains. What should I do?
     

    Attached Files:

  29. stu_pidd_cow

    stu_pidd_cow

    Joined:
    Aug 4, 2014
    Posts:
    233
    What version of URP are you using?
     
  30. NHNminiyume

    NHNminiyume

    Joined:
    Jul 1, 2021
    Posts:
    5
    I am using Version 12.1.7. In addition, I used comments to prevent errors from occurring and ran the program, but the fog did not appear.
     
  31. stu_pidd_cow

    stu_pidd_cow

    Joined:
    Aug 4, 2014
    Posts:
    233
    Commenting out those lines should fix the compile errors. Alternatively, you can update Unity (just to a more recent minor version should do it).

    You will need to make sure Depth Texture is ticked on your Universal Render Pipeline Asset.
     
    Last edited: Dec 11, 2023
  32. miniyume

    miniyume

    Joined:
    Jul 3, 2018
    Posts:
    9
    Okay. I updated Unity to the new minor version as per the guide you gave me (2022.3.11f1) .
    Fortunately, the error disappeared.
    But there is still no fog coming out. Create a new URP project and FogOfWar2D_URP, FogOfWar3D_URP
    It's the same on the screen.
    If you run it on the FogOfWarSetUp Window, you will see the following error mark.
    Will this help to solve the problem?
     

    Attached Files:

  33. stu_pidd_cow

    stu_pidd_cow

    Joined:
    Aug 4, 2014
    Posts:
    233
    What happens if you click on the "Auto-Fix" button below the error in that window?
     
  34. NHNminiyume

    NHNminiyume

    Joined:
    Jul 1, 2021
    Posts:
    5
    Hi. I reinstalled the top version of Unity (2022.3.15f1)
    When you press the Auto-Fix button, the following error occurs.
    I set it to URP, and I didn't touch anything else.
     

    Attached Files:

    • 4.jpg
      4.jpg
      File size:
      271.8 KB
      Views:
      22
  35. stu_pidd_cow

    stu_pidd_cow

    Joined:
    Aug 4, 2014
    Posts:
    233
    You will need to manually add the FogOfWar render feature to all of your UniversalRenderData scriptable objects, and disable SSAO on them.
     
  36. NHNminiyume

    NHNminiyume

    Joined:
    Jul 1, 2021
    Posts:
    5
    hi. I don't know what to do specifically about your answer. Could you please share a guide or screenshots related to this? I downloaded and imported the package as a new Unity project, set up only URP, and ran it as a URP sample scene, but having to redo various settings seems to have increased the difficulty of learning. Apparently it was working normally until the update. I tested it on two computers, one at work and one at home, and both showed the same result: no fog. I wonder if all other users are operating normally. It may be necessary to check again to see if there are any problems with the newly updated part.
     
  37. stu_pidd_cow

    stu_pidd_cow

    Joined:
    Aug 4, 2014
    Posts:
    233
    I haven't heard of anyone else having issues, but it's possible there could be an issue on my end.
    To fix this error, you should need to identify your UniversalRendererData (you can find this by typing t:UniversalRendererData in the project search). According to your last screenshot, you have 3 of them in your project.
    Then you need to add the Fog Of War render feature (you do this with the "Add Renderer Feature" at the bottom.
    You also need to untick Screen Space Ambient Occlusion. See the screenshot below.
    upload_2023-12-13_13-39-33.png
     
  38. NHNminiyume

    NHNminiyume

    Joined:
    Jul 1, 2021
    Posts:
    5
    Oh, I finally solved it because I did what you told me in the screenshot above. I didn't know that I had to connect because I didn't have enough knowledge about URP. It would be nice to have this in UserGuide so that people can check more quickly like me. Thank you for your response :)
     

    Attached Files:

    • 5.jpg
      5.jpg
      File size:
      127.9 KB
      Views:
      21
  39. DwinTeimlon

    DwinTeimlon

    Joined:
    Feb 25, 2016
    Posts:
    300
    Using legacy render pipeline and FogShapes causes the following error with the new version:

    upload_2023-12-16_14-12-30.png
    upload_2023-12-16_14-13-7.png
    upload_2023-12-16_14-13-39.png

    Changing the shape texture to uncompressed did solve the problem, but maybe add a hint that this is needed.
     
    Last edited: Dec 16, 2023
  40. DwinTeimlon

    DwinTeimlon

    Joined:
    Feb 25, 2016
    Posts:
    300
    The variable finalFogTexture in FogOfWarTeam is gone as described in the patch notes, which I used for my minimap implementation.

    Using fogTexture does not work as it shows the map fully uncovered now.

    This is my current minimap shader code for reference. fogCol was used from the former finalFogTexture.How would I need to change this?


    Code (CSharp):
    1.             float4 frag(v2f_customrendertexture IN) : COLOR
    2.             {
    3.                 fixed4 mainCol = tex2D(_MainTex, IN.localTexcoord.xy);
    4.                 fixed4 fogCol = tex2D(_FogTex, IN.localTexcoord.xy);
    5.                 if (fogCol.a > Threshold) fogCol = MIN_FOG;
    6.                 fixed4 finalCol = lerp(mainCol, fogCol, fogCol.a);
    7.                 return finalCol;
    8.             }
     
    Last edited: Dec 16, 2023
  41. stu_pidd_cow

    stu_pidd_cow

    Joined:
    Aug 4, 2014
    Posts:
    233
    Thanks for pointing this out. I'll definitely stick a message in for the next update.

    You can still do this, but it up to the renderers to decide how to combine the partial and fully visible pixels.
    FogOfWarTeam.fogValues contains Color32 where:
    • R = Partially visible areas (255 = fully fogged, 0 = fully visible in previous frame)
    • G = Fully visible areas (255 = fully fogged, 0 = fully visible in this frame)
    • B, A = Not used
    So you may need to change your shader to be something like this (completely untested):

    Code (CSharp):
    1. float4 frag(v2f_customrendertexture IN) : COLOR
    2. {
    3.     fixed4 mainCol = tex2D(_MainTex, IN.localTexcoord.xy);
    4.     fixed4 fogCol = tex2D(_FogTex, IN.localTexcoord.xy);
    5.     fixed fogAmount = min(fogCol.g, fogCol.r * 0.5f + 0.5f);
    6.     if (fogAmount > Threshold) fogCol = MIN_FOG;
    7.     fixed4 finalCol = lerp(mainCol, fixed4(0, 0, 0, 1), fogAmount);
    8.     return finalCol;
    9. }
     
    DwinTeimlon likes this.
  42. DwinTeimlon

    DwinTeimlon

    Joined:
    Feb 25, 2016
    Posts:
    300
    Wonderful, thank you!
     
  43. Kondor0

    Kondor0

    Joined:
    Feb 20, 2010
    Posts:
    601
    Hi,

    I updated Fog of War today (been using it for a while now in my current game) and while it seems it's working fine now I keep getting this exception when I save a scene (even if the scene doesn't contain the FoW components):

    TargetParameterCountException: Number of parameters specified does not match the expected number.

    FoW_Exception.png

    As you cna see the exception has no line or I would try to fix it myself.

    I'm using an old Unity version (2019.4.29) because the game has been in development for a long time so maybe that's the reason (I had to update some of the code to work after the update) but I rather not be forced to update the whole project to get this exception to stop appearing.

    Any idea what can be the problem?

    EDIT: I'm using Legacy btw, I deleted the other pipelines folders.
     
  44. stu_pidd_cow

    stu_pidd_cow

    Joined:
    Aug 4, 2014
    Posts:
    233
    I haven't seen this before. Do you have the FogOfWar Setup window left open when this happens? Does it happen if you save the sample scenes as well? It's complaining about reflection, but I'm not aware of any reflection in FogOfWar outside of the setup window.
     
  45. holmes_unity609

    holmes_unity609

    Joined:
    Mar 31, 2020
    Posts:
    1
    Hi

    I need version v1.24 where can I get it?

    I can't update Unity.
    My Unity version is 2021.3.9f1
     
  46. Kondor0

    Kondor0

    Joined:
    Feb 20, 2010
    Posts:
    601
    Nope, it happens in every scene when I save even if there's no FoW components, it doesn't matter if the setup is opened or closed.

    It must be an issue with Fog of War because it only started after I imported the update.
     
  47. stu_pidd_cow

    stu_pidd_cow

    Joined:
    Aug 4, 2014
    Posts:
    233
    I don't think there's any way through unity to get previous versions. What do you needd it for?
    If you send me an email, I can fetch an older unitypackage for you.

    I just had a look at this. I can repro it in 2019.4.40f1. I tried disabling all of the reflection in FoW but it still persists. I'll look into it some more soon and get back to you.
     
    Kondor0 likes this.
  48. stu_pidd_cow

    stu_pidd_cow

    Joined:
    Aug 4, 2014
    Posts:
    233
    @Kondor0 I've attached a script to replace the FogOfWarSetup.cs file that should fix the error. I'll make sure this gets in for the next release. Thanks for pointing this out.
     

    Attached Files:

    Kondor0 likes this.
  49. Kondor0

    Kondor0

    Joined:
    Feb 20, 2010
    Posts:
    601
    The exception is gone, thanks! I'll write a review and mention the fast support.

    Now, this is a shot in the dark but I have a question: do you know if the previous version had any issues with Apple M1 Pro?

    I ask because recently I had a player of my last game mentioned an issue where he cannot see the map and all is blurry, it could be other problem but one of the suspects is the Fog of War and it's the reason why I downloaded the update in the hopes that including it in the next patch might fix this (I don't have a Mac so I cannot repro this issue).

    Anyway, I hope to patch the game next week so we'll know then.

    Cheers!
     
  50. stu_pidd_cow

    stu_pidd_cow

    Joined:
    Aug 4, 2014
    Posts:
    233
    Thanks for the review!

    I don't suppose you have a screenshot of the issue? If the fog is not appearing correctly, that's often an issue with the depth buffer which can vary per device, but I haven't heard of any blurring before.