Search Unity

Shader stopped working on every platform, but still looks fine in editor.

Discussion in 'Shaders' started by greenland, May 29, 2017.

  1. greenland

    greenland

    Joined:
    Oct 22, 2005
    Posts:
    205
    I've a custom but simple shader which (apparently spontaneously) has stopped working everywhere except the Unity editor preview. Specifically, the FlashAmount property tween has no visible effect. (Android/Windows/Vulkan/GLES/DX11) Does anybody have an idea why this would happen? Did something change with 5.6.1? The shader code hasn't changed in a couple years...

    Has anybody ever encountered a similar problem?
    editor_flash.JPG no_flash.JPG only the corresponding particle effect is rendered
     

    Attached Files:

    Last edited: May 29, 2017
  2. greenland

    greenland

    Joined:
    Oct 22, 2005
    Posts:
    205
    I found out that the below message is never displayed in the editor, but displayed when I run a build. :mad:

    if (!GetComponent<Renderer>().material.HasProperty(FLASH_AMOUNT))

    {
    StatusText.Instance.Add("I literally can't even");
    }

    I've no idea whats going on.