Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

How to 'whiteOut' a tilemap?

Discussion in '2D' started by jasonbb, Apr 18, 2020.

  1. jasonbb

    jasonbb

    Joined:
    Aug 7, 2015
    Posts:
    7
    I want to apply the 'whiteout' effect to my Tilemap.
    It's that old skool game effect.
    For instance when the player shoots my wall or something important (tilemap) - the whole tilemap flashes white for a couple of frames.
    Cheers :)
     
  2. Primoz56

    Primoz56

    Joined:
    May 9, 2018
    Posts:
    369
    have a full screen white image overlay everything, with canvas group component set it's alpha to 0 to make it transparent. when you want to make it 'flash', animate it so the alpha goes to 1 then 0 then 1 then 0 etc.
     
  3. jasonbb

    jasonbb

    Joined:
    Aug 7, 2015
    Posts:
    7
    ok, that might work - it's a bit over my head :)

    But, I have found another way to do this.

    I created a new PNG that only contains white shapes on a transparent background. There are about 20 pieces that match the shapes of my level tilemap. Now I just create a new (white) tilemap above the level tilemap in the shape of the highlight. Then I set the alpha of the white tilemap in code.

    It works :)