Shadows for Instantiated Asset Bundle Objects?

I’m currently working on a project and my next goal is to be able to instantiate an object from asset bundle during runtime, I managed to reach that far but I noticed that my instantiated object from asset bundle doesn’t have any shadows. I tried dragging out the exact object that’s in my assets folder and it works fine, even instantiating the object in my assets folder seems good, but the problem occurs when I try to instantiate it from assets bundle.

I’m not really sure whether I’m doing something wrong, or is this a Unity bug.

The plane and cube with the shadow are dragged from the asset bundle whilst the objects without shadows are instantiated from the asset bundle.

Thanks a lot for taking the time to read!

Seems like instantiating through assetbundles did something to it’s shader, I used this code to re-set all of the shaders in the scene and it worked for me.

Shader standardShader;

void Start() {
standardShader = Shader.Find(“Standard”);
}

void changeShader() // because shadow for assetbundle is cucked.
{
var renderers = FindObjectsOfType() as Renderer[ ];
for (int i = 0; i < renderers.Length; i++)
renderers*.material.shader = standardShader;*
}
and called it after all of the instantiating is done.

the same in Unity 2017.2
BUG no doubt - problem with shadows…

Same in Unity 2021.3.11f1

Still happened in Unity 2022.3.34f1c1