Lightweight Shaders in Asset Bundle not loading properly

Hello,

I’m using Lightweight Render Pipeline in my project. And i’m loading scene from assetbundle. Shaders are not loading pink, but they are not behaving properly. I couldn’t find those shaders in Always Included shaders in Graphics Settings.

I tried this code when scene loaded;

foreach (Renderer r in GameObject.FindObjectsOfType())
{
           var material = Shader.Find(r.material.shader.name);
           r.material.shader = null;
           r.material.shader = material;
}

But it never answers.

I’m using Unity 2018.1.7f1

Could anyone help me ?

Thank you.

Finally i found a solution !

foreach (Renderer r in GameObject.FindObjectsOfType())
    {
                        Material mat = new Material(Shader.Find(r.material.shader.name));
    
                        mat.CopyPropertiesFromMaterial(r.material);
    
                        r.material = mat;
    }