Search Unity

Custom Shaders not working

Discussion in 'Addressables' started by Patrick_PS, Jan 24, 2020.

  1. Patrick_PS

    Patrick_PS

    Joined:
    Sep 9, 2019
    Posts:
    154
    I made a few scenes addressable and they are loading fine but all scene content that uses custom shaders is completely pink. I tried making an addressables group containing all my shaders instead of them being implicit dependencies but that did not resolve the issue.

    Are there some options I need to set somewhere? Do I need to change something in the shader code?

    Any help is welcome.

    edit: I have the issue in the editor (packed mode), iOS build, and Android build.
     
    Last edited: Jan 24, 2020
  2. IggyZuk

    IggyZuk

    Joined:
    Jan 17, 2015
    Posts:
    43
    As far as I understand shaders are built differently for each platform. When you're in the editor switched to a platform like iOS/Android packed mode will use the built assets for those platforms.

    However, iOS/Android shaders are incompatible with your actual platform: macOS/Win/Linux.

    If you switch to standalone and build your assets then packed mode will pull standalone assets with shaders that work on your actual platform.
     
  3. Patrick_PS

    Patrick_PS

    Joined:
    Sep 9, 2019
    Posts:
    154
    Thanks for the answer. I rebuild the game and now everything is fine on the devices.

    In a previous build everything was pink and I am not sure what I did to fix that.