AssetBundle Shader is "Hiden/InternalErrorShader"

hi.

i made windows and webgl platform assetbundle.

assetbundle in custom shader.

It is not included in the built software.

In WebGL, shader are displayed correctly, but in windows they become “Hidden / InternalErrorShader”.

Is it a specification that shaders not included in builds with Windows are not displayed?

using unity 5.6, 5.5

seems to happen for everyone…

as a workaround i’m adding shaders to always included shaders, and/or doing this to all loaded bundles,

                    foreach (Renderer r in go.GetComponentsInChildren<Renderer>(includeInactive: true))
                    {
                        var material = Shader.Find(r.material.shader.name);
                        r.material.shader = null;
                        r.material.shader = material;
                    }

i hope there would be better solutions…?

thank you reply.

i tryed it’s solutions.

i use this code.

var rs = obj.GetComponentsInChildren(true);
for (int i = 0; i < rs.Length; i++)
{
for (int j = 0; j < rs*.materials.Length; j++)*
{
rs_.materials[j].shader = Shader.Find(rs*.materials[j].shader.name);
}
}*
but, windows is not working._

try adding shader to always included shaders

If “Always included shaders” is not used, is there a specification that can not load custom shaders from assetbundle?

In my software, it is possible to load asset bundles containing shaders that are not included in the software. It works in WebGL, it does not work on PC. If this is a specification, I need to think about other implementation methods.

solved.

When wait processing was put in front of “Shader.Find”, it worked properly.

thank you for reply!