- Home /
Material with Custom Shader in AssetBundles
Hi All,
I am creating asset bundles with materials that use basic shader i wrote.
the material itself running properly.
when creating an assetbundle (my targeted platform is iPhone) the generated material turn to black. if i re select the shader from the drop down menu everything works fine.
the shader file in the Resources folder
what am I missing?
any help will be appreciated
===EDIT===
I did a workaround by referencing the shader after loading the bundle in runtime....
though I am still wondering whether there is another way?
Ive just encountered this issue, have you had any luck figuring this out?
try just to reference shader file inside a bundle. i had same issue with shaders. just create a dummy object with a script referencing to value of type Shader, assign your shader to this object and be sure this dummy object including in your bundle.
Your answer
![](https://koobas.hobune.stream/wayback/20220613072456im_/https://answers.unity.com/themes/thub/images/avi.jpg)