Search Unity

shader missing in assetbundle

Discussion in 'Shaders' started by jerrychan80, May 6, 2015.

  1. jerrychan80

    jerrychan80

    Joined:
    Mar 12, 2014
    Posts:
    1
    build assetbundle with following code in Unity 5.0.1
    BuildPipeline.BuildAssetBundles(outputPath, 0, EditorUserBuildSettings.activeBuildTarget).
    also add shader in graphics setting.but when loaded in pc editor with same target,shader is pink
    what's the proper way to build assetbundle with shader?
     
  2. G1NurX

    G1NurX

    Joined:
    Dec 25, 2012
    Posts:
    69
    I built a scene - including some cubes with default material - into an assetbundle for iOS.
    All cubes are pink !!! Shader.Find shows me shader exists.
     
  3. larku

    larku

    Joined:
    Mar 14, 2013
    Posts:
    1,422
  4. G1NurX

    G1NurX

    Joined:
    Dec 25, 2012
    Posts:
    69
    Problem being found on mobile device, not the well known editor issue.

    BTW, this is hack fix, low performance, hard to maintain in real world project