Search Unity

Question Custom color flash shader not work correctly when animation playing.

Discussion in 'Shaders' started by WayneJP, Dec 31, 2022.

  1. WayneJP

    WayneJP

    Joined:
    Jun 28, 2019
    Posts:
    44
    I use a custom shader to make sprite flash by using material property block to modify valuse in shader.

    In editor mode, after switching keyframe in animation window and then switch material property value in custom shader, the sprite become totally white like following image and the main texture seems missing.

    This problem happens too in play mode.

    The problem seems obvious but I have no idea where can I start to fix it.

    Update: When I switch inspector to debug mode, and switch property value, the flash shader work fine.
     

    Attached Files:

    Last edited: Dec 31, 2022