Search Unity

Question Fog of War / Shroud in 2D projects

Discussion in '2D' started by frogspire, Jun 5, 2023.

  1. frogspire

    frogspire

    Joined:
    Apr 26, 2021
    Posts:
    1
    I've found a few videos related to the "Fog of War" feature, especially in 3D. But the material on 2D seems few and far between.

    The stuff that does exist isn't always satisfactory. The best / closest to the effect I'd like to achieve is here:



    But that does seem somewhat inefficient, and is a tremendous amount of work for what I would assume would be a fairly straightforward effect that a lot of people use.

    Is there a Unity official way of making the Fog of War (or recommended way, even?)

    Any ideas or recommendations would be greatly appreciated.
     
  2. karderos

    karderos

    Joined:
    Mar 28, 2023
    Posts:
    376
    "unity offficial"? You mean like a feature out of the box? No
     
  3. vonchor

    vonchor

    Joined:
    Jun 30, 2009
    Posts:
    249
    I use a Tilemap with a large grid size (e.g., the grid size is not 1,1,1) and a corresponding section of my save file (for a particular game 'level') that includes info about which positions to fill (fog).

    Hope that makes sense...