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. Dismiss Notice

Question 2D Sprite Shader - different scale in editor and play mode

Discussion in 'Shader Graph' started by Erenquin, Dec 16, 2022.

  1. Erenquin

    Erenquin

    Joined:
    Apr 9, 2018
    Posts:
    164
    Hello,
    I created a dissolve effect in a shader graph for a sprite.
    It works as I want in editor mode:
    upload_2022-12-16_11-32-22.png

    But in play mode the scale is different:
    upload_2022-12-16_11-33-48.png

    At first I thought it could be due to the scale of the sprite (at the basis I use the white square scaled to the rectangle), but as you can see it does exactly the same on the square.

    Why is the effect different in the 2 modes (editor and play) ?
     
  2. Erenquin

    Erenquin

    Joined:
    Apr 9, 2018
    Posts:
    164
    I realized that I had 2 white square sprites in my assets, a test one (that I probably copied from the default one) and the unity default one.
    For whatever reason, the sprite selector was only showing me one of them, mine.
    When I assigned the default one, the shader behavior is consistant between editor and play mode.

    Yet it does not explain why the behavior is inconsistent when using my copy.