Search Unity

Modified Internal-PrePassLighting isn't used in webplayer

Discussion in 'Shaders' started by ZoltanErdokovy, Feb 15, 2013.

  1. ZoltanErdokovy

    ZoltanErdokovy

    Joined:
    Aug 23, 2012
    Posts:
    102
    I have a slightly modified version of the "Internal-PrePassLighting.shader" file, placed
    next to my other custom shaders. It works great in the editor but in the webplayer the
    original one is used. What should I do to include it in the build? I'm using v3.5.
     
  2. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    Put it into a folder named "Resources".

    Unity only includes the assets that are actually used by something in the game. But since nothing explicitly "uses" your modified shader, it's just not included in the game data.

    Folders called "Resources" are special; Unity will include everything under that folder in the game build.
     
  3. ZoltanErdokovy

    ZoltanErdokovy

    Joined:
    Aug 23, 2012
    Posts:
    102
    Excellent, thank you!