Search Unity

Feedback Please make a separate setting for recompiling shaders in play mode

Discussion in 'Editor & General Support' started by phosphoer, Jul 17, 2020.

  1. phosphoer

    phosphoer

    Joined:
    Jan 11, 2015
    Posts:
    3
    Pre-2019, when editing a shader in play-mode, it would immediately hot-reload on save, which was great for quick iteration.

    As soon as the option became available, I changed my editor pref to Recompile scripts after exiting playmode, as it is extremely rare that any large project can actually continue working after an assembly reload. Before 2019, this had no effect on shaders.

    In Unity 2019, it seems that shaders are now considered scripts, and respect that setting, which I think is really annoying.

    Now I can't have both things that I want. I never want an assembly reload in play mode, but I do sometimes want to edit and save scripts while in playmode so that I can make bug fixes on the fly (without a recompile, just making the changes while I'm playing). I *always* want shaders to immediately recompile on save since it can never break the game as they don't contain state.

    Could we either revert this change or make a separate setting for the recompile behavior of shaders? I know I can still manually reimport the shader but it is very cumbersome to track it down in the assets window and requires pausing the game / leaving the game window.
     
    Sorumi, evyatron, Madgvox and 7 others like this.
  2. Noisecrime

    Noisecrime

    Joined:
    Apr 7, 2010
    Posts:
    2,054
    Agreed. I noticed this recently and its a real pain when you are used to tweaking shader in real-time.
     
  3. LukeFireproof

    LukeFireproof

    Joined:
    Jan 21, 2016
    Posts:
    13
    I 100% agree. Recompiling shaders on the fly in play mode is my default method of shader iteration and I use it pretty much daily. This is a huge inconvenience for me!
     
  4. antonkudin

    antonkudin

    Joined:
    Aug 4, 2014
    Posts:
    32
    Agreed!
     
  5. dotsquid

    dotsquid

    Joined:
    Aug 11, 2016
    Posts:
    224
    Yes, please.
     
  6. TigerHix

    TigerHix

    Joined:
    Oct 20, 2015
    Posts:
    69
    Bumping again for more attention from Unity.
     
  7. MylesLambert

    MylesLambert

    Joined:
    Dec 31, 2012
    Posts:
    61
    & Bumping again :(
    You can manually reimport the shader asset and it'll recompile the shader during play mode (atleast in 2019.4.34f1) but having the shader auto-recompile regardless of play mode settings would be ideal.
     
  8. Pattrigue

    Pattrigue

    Joined:
    Nov 24, 2018
    Posts:
    67
    Bump again, this is very annoying to deal with.
     
    Noisecrime likes this.