Search Unity

  1. New Unity Live Help updates. Check them out here!

    Dismiss Notice

"Unknown Shader Channel Count"

Discussion in 'Editor & General Support' started by jasonboukheir, Feb 13, 2018.

  1. jasonboukheir

    jasonboukheir

    Joined:
    May 3, 2017
    Posts:
    5
    Running into this error when trying to build. No other information comes up. Has anyone experienced this or know of a way to troubleshoot this error?
     
  2. AtlasPhyco

    AtlasPhyco

    Joined:
    Apr 28, 2014
    Posts:
    3
    I get the same issue. Any help would be welcome.
     
  3. ToyBrain101

    ToyBrain101

    Joined:
    Sep 15, 2014
    Posts:
    13
    same here, no info. wtf
     
  4. mihai9323

    mihai9323

    Joined:
    May 31, 2013
    Posts:
    3
    I am also getting this error while trying to build
     
  5. mihai9323

    mihai9323

    Joined:
    May 31, 2013
    Posts:
    3
    managed to get a build working after I deleted all the shaders in my Vuforia/Shaders folder... Not sure exactly which one was causing the error
     
  6. mkrzaczek

    mkrzaczek

    Joined:
    Jun 9, 2017
    Posts:
    3
    We have the same problem, only on osx. Hundreds of those errors are thrown on any Resource.Load. It's happening when playing in editor, building atlases and it's preventing from building the game. Unity 2017.3.1p1, target iOS.
     
  7. dfurmanGS

    dfurmanGS

    Joined:
    Jun 29, 2017
    Posts:
    11
    Same situation here.
     
  8. Andre_Mcgrail

    Andre_Mcgrail

    Unity Technologies

    Joined:
    Dec 9, 2016
    Posts:
    225
    Hey guys,

    Can anyone post a shader here that you know is causing the issue, I believe this hasn't been brought up internally, and without a repo we cannot track the issue down.

    I see above mihai9323, you have had it happen with Vuforia shaders, will start looking there.

    Any more information about the issue will be gladly welcomed.
     
  9. AmbOcclusion

    AmbOcclusion

    Joined:
    Sep 17, 2012
    Posts:
    28
    We're having this issue at work and can't build locally, it's been driving me crazy for weeks. We don't use Vuforia.
     
  10. valyard

    valyard

    Unity Technologies

    Joined:
    Jun 4, 2010
    Posts:
    290
    Can you guys try clearing cache server data and deleting Library folder? We have a customer who got it working by doing this.
     
    oktaymelis likes this.
  11. JadeTheFlame

    JadeTheFlame

    Joined:
    Jul 27, 2014
    Posts:
    7
    I can confirm that this worked for me as well.
    The only plausible link I may have is downloading the legacy shaders for the same version, and removing them shortly after. Otherwise no idea what caused this.
     
  12. PNordlund

    PNordlund

    Joined:
    Nov 20, 2013
    Posts:
    48
    I had a clean local cache server and I still get this error when trying to build for Android. Would be super helpful to add the name of the shader to the error.
     
  13. dougdodd

    dougdodd

    Joined:
    Apr 18, 2014
    Posts:
    32
    I had the same problem (Unknown Shader Channel Count) and I narrowed it down and solved it. I'm not running a cache server and deleting my Library folder did not solve my problem.
    I'm running Unity 2017.3.1f1 on Windows 7 and building for Gear VR (Android)
    Steps I took:
    Create empty scene (File | new Scene) named it "empty"
    In the Scene in which I was getting the Unknown Shader Channel Count (i.e MainScene)
    I started a "process of elimination":
    1. open MainScene
    2. delete something, save scene as "Test" (always preserving MainScene)
    3. clear the console
    4. open empty
    5. open Test
    If I still see the error(s), I repeat steps 1-5 until I get no errors. The last thing I deleted has the errors.
    Now, this is where it gets interesting (and should help the Unity engineers hunt down the problem):
    1. Open MainScene and make a prefab out of whatever caused the errors.
    2. Delete the new prefab and save scene as "Test"
    3. repeat "process of elimination" steps 3-5
    If you don't see the errors with "Test" open,
    1. pull in the prefab you made in step 1 above, save scene as "Test"
    2. repeat above steps 3-5 from "process of elimination" steps
    3. Now "Test" is MainScene with everything fixed
    4. Save as "MainScene"
    That completely eliminated the problem for me, now I can build to Android device again.

    This took me a couple of hours to figure out; hopefully, I can save someone time and get them up and running again. The solution was to identify what was causing the errors, create a prefab out of that, delete the offender and pull the prefab back in.
     
    Last edited: Mar 4, 2018
  14. mkrzaczek

    mkrzaczek

    Joined:
    Jun 9, 2017
    Posts:
    3
    The problem is that that error does not tell us what shader is causing that. Otherwise it would be easy...

    I can confirm, however, that deleting cache server did help.
     
    GibTreaty likes this.
  15. ToyBrain101

    ToyBrain101

    Joined:
    Sep 15, 2014
    Posts:
    13


    This Totally works!
    Thanks.
     
  16. Antonijoan

    Antonijoan

    Joined:
    May 3, 2016
    Posts:
    2
    How can we safely clear the cache data in the Cache Server?

    Thank you
     
  17. ToyBrain101

    ToyBrain101

    Joined:
    Sep 15, 2014
    Posts:
    13
    I tracked my Unkown
    it is in the preferences tab
     
  18. ToyBrain101

    ToyBrain101

    Joined:
    Sep 15, 2014
    Posts:
    13
    I tracked the problem to a leaf shader that was not converted to and optimized hidden shader. Problem Solved.
     
  19. ToyBrain101

    ToyBrain101

    Joined:
    Sep 15, 2014
    Posts:
    13
    My shader was on a Unity Tree
     
  20. Antonijoan

    Antonijoan

    Joined:
    May 3, 2016
    Posts:
    2
    Sorry, I forgot to mention that I am using a cache server stored in a remote machine. No "Clean Cache" option shown in this case.
     
  21. KrisG_TTG

    KrisG_TTG

    Joined:
    Feb 26, 2018
    Posts:
    2
    We saw this issue too. Fixed by clearing the network cache server.
     
  22. DynastyV

    DynastyV

    Joined:
    Mar 16, 2015
    Posts:
    14
    I received this error as well after I tried to roll a project back to 2017.1.1f1 from 2018.1.0b12. I resolved this issue by re-cloning my Git repository. I'm guessing that there was some file that wasn't tracked by Git that caused the issue. I do not use a cache server, so that is not the issue.
     
  23. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    8,150
    I get the same error after import of 2018 unitypackage into unity 2017.

    Seems like one of my shaders is broken, but i cannot tell why or if the import is to blame and is not fixed by shader recompile or erasing library folder.
     
  24. FeastSC2

    FeastSC2

    Joined:
    Sep 30, 2016
    Posts:
    749
    I got this error after rolling back from v.2018 to v017. I'm aware rolling back to an earlier version is not supported, but has a solution been found?

    Clearing cache / Deleting library folder did not fix the problem
     
    Last edited: Apr 15, 2018
  25. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    8,150
    In my case a custom made plane asset i created lost the UV information thus making the shader attached fail.

    I had to recreate the asset in Unity 2017 to fix as i could not see a proper object import dialog for the plane mesh
     
  26. gratco

    gratco

    Joined:
    Jun 3, 2013
    Posts:
    1
    I had this problem when I baked the lighting in 2018 and then reopend the project in 2017.
     
    Echo____G and arturmandas like this.
  27. FeastSC2

    FeastSC2

    Joined:
    Sep 30, 2016
    Posts:
    749
    Did the error happen even when you didn't have the scene with that plane mesh opened?
     
  28. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    8,150
    I am not sure on that, i think i saw the issue as soon as i entered the affected prefab in the scene though, so should be when the mesh was on the scene, but now i have fixed it so cant say 100% if that was the general case.
     
  29. Andre_Mcgrail

    Andre_Mcgrail

    Unity Technologies

    Joined:
    Dec 9, 2016
    Posts:
    225
    If you can consistently reproduce the error in your project can you please open a bug and attach a small repo of the project. We have yet to receive a consistent repo that doesn't involve a corrupt shader in a cache server/library.
     
  30. Kuzkay

    Kuzkay

    Joined:
    Oct 25, 2016
    Posts:
    1
    In my case it was something with Light maps, I cleared them and rebaked in lower quality and it built the game with no errors
     
  31. PotatoVeg

    PotatoVeg

    Joined:
    Jan 28, 2017
    Posts:
    11
    i am having the same issue aswell, i have tried dougdodd's solution and i cleared and got rid of the errors when opening my scene.
    now my scenes are clean from those errors but i notice that this error is being printed 40 times upload_2018-5-6_18-41-29.png

    i have tried everything already....
    anyone any idea? =/

    EDIT:
    i have moved from 2017.2.0f3 to 2018.1.0f2 and seems like it fixed the issue, but it doesn't sound right that upgrading version is the solution, nothing has changed in my project since the last time i tried to build, no new shaders no new materials no new images.
    very odd.
     
    Last edited: May 7, 2018
  32. black_goody

    black_goody

    Joined:
    Dec 2, 2014
    Posts:
    1
    I have these problems when open/import my project in Unity 2018.1 once and then import in back again in 2017.4.

    The first problem "Unknown Shader Channel Count", I find that change canvas "Additional shader channels" to "Nothing" solve this error.

    The second problem is an error during build. I believe this is caused by Unity automatically upgrade shaders to 2018 which made it incompatible with 2017. This will not show up in the editor but cause build to fail. I simply replace all my shaders with the previous version (before imported into 2018).

    So, I conclude never open the project to a newer version and then try to go back. The warning clearly states that :p

    Hope this help.
     
    Andre_Mcgrail likes this.
  33. NGC6543

    NGC6543

    Joined:
    Jun 3, 2015
    Posts:
    211
    While trying to restore my other project, I realized that the project's 'Library' forder must be removed. Without removing it(force re-import assets, maybe?) the build failed.

    ----------------------------------------------------------------------

    It looks like I found the simplest solution!

    My case was similar, too. I upgraded my project from 2017.4.2f2 to 2018.1.0f2, but there seems to be an unhandled memory leak on native side in one of the libraries i'm using, so I had to roll back to 2017. After reloading the project on 2017 those 'unknown shader channel count' appeared.

    I tried to delete the libraries folder, (didn't use cache server) but didn't fix it.

    Then I just opened the scene with error,
    disabling all the gameobjects in it and save it,
    open another scene,
    and came back to the prior one and re-enable all the gameobjects and saved.

    Now the error message no longer appears, and the project was built and ran just fine again!

    Hope this helps someone!
     
    Last edited: May 18, 2018
  34. HeadHunter2009

    HeadHunter2009

    Joined:
    Jul 3, 2012
    Posts:
    49
    Tx you a lot! Saving scene with disabled game objects fixed this issue!
     
    LocalJoost and NGC6543 like this.
  35. PotatoVeg

    PotatoVeg

    Joined:
    Jan 28, 2017
    Posts:
    11
    this solution helped my situation, thank you NGC6543 :)
     
    NGC6543 likes this.
  36. fdsagizi2

    fdsagizi2

    Joined:
    Nov 4, 2013
    Posts:
    69
    i got the same error when build.

    Problem was in some FBX file, i just reimport that FBX file, and error dissaper
     
  37. rad1c

    rad1c

    Joined:
    Feb 26, 2016
    Posts:
    21
    I rolled back from Unity 2018.x "Gamebreaker Edition" to 2017.4.3[latest 2017.X available], faced the same issue. Nothing worked for me (delete Library folder, Reimport all, new project, download assets, overwrite them in prj, etc) except for your solution! A big-big-big-big-GIANT thanks flies to you mate!

    The only thing I can add to this, it can be simplified if one has an environment/hierarchy allowing this, i.e.:
    Create a prefab from the highest level in the hierarchy from everything (it was 3 prefabs for me, I didn't care there are other prefabs in my tree, etc), save, new scene, add all these prefabs, save again, back to the original scene and done. One can delete now the temporary scene.
     
  38. jtbentley

    jtbentley

    Joined:
    Jun 30, 2009
    Posts:
    1,396
    This occurred on a project with AR Core & AR Kit plugins, and also Shader Forge, and everyone's favourite plugin for making life difficult - Google Play Services.

    Same symptoms as others, would spam 'Unknown Shader Channel Count', and would prevent builds with no meaningful error in Editor log (iOS only, Android worked).

    Clearing the library folder solved :)
     
  39. syamilsynz

    syamilsynz

    Joined:
    Dec 22, 2013
    Posts:
    29
    Deleting AtlasCache folder in library folder work for me. After delete AtlasCache folder, when I hit play editor, it will generate new AtlasCache and no error found.
     
  40. MahmoudAshrafCis

    MahmoudAshrafCis

    Joined:
    Nov 12, 2017
    Posts:
    1
    i faced this problem when i have an asset bundle exported a unity version and imported in the editor in other unity version.

    further explanation :-
    exported an asset bundle using Unity some 2018 version
    hosted the bundle on an online host
    in unity 2017 version editor download and using
    AssetBundle.LoadAsset(myAssetBundle); https://docs.unity3d.com/ScriptReference/AssetBundle.LoadAsset.html
    would through the error
    "Unknown Shader Channel Count"

    i resolved it by reexporting the asset bundle using the current used unity
     
    beren_unity and Demoralizator like this.
  41. thepepperone2016

    thepepperone2016

    Joined:
    Jul 18, 2016
    Posts:
    2
    Having the same issue for no reason at all.
    Project settings have remained the same since last opened.
    It grinds my gears to what's really causing this. Now, we need to reimport all the assets on my project which then takes a lot of time as this is a huge load of a project(a whole day just importing assets/textures).

    Unity Team, please just... (frustration sigh)
     
  42. markhurry

    markhurry

    Joined:
    Nov 14, 2017
    Posts:
    1

    Brilliant, worked for me. Thanks
     
  43. TheJimz

    TheJimz

    Joined:
    Jun 26, 2015
    Posts:
    49
    Same issue for us in upgrading up to 2017.4.14f1 from 5f1.
     
  44. oktaymelis

    oktaymelis

    Joined:
    May 26, 2018
    Posts:
    1
    it worked for me too :) thanks
     
  45. tiancaiwrk

    tiancaiwrk

    Joined:
    Nov 23, 2017
    Posts:
    35
    Same Error, get tons of it.
    when I create a Sprite Atlas and add some sprite to it, build AssetBundle will post error!!!
     
unityunity