- Home /
Gameobject goes black when changing material at runtime
Hi all,
I have a project which was created in Unity 5.6.1 and now I am upgrading the project to version 2019.4.3.
The application loads some asset bundles that were created in unity version 5.6.1. Some are baked and some are not. When I try to change material at runtime, the Gameobject goes black. (I am using Standard and Standard Specular shaders). This works fine in the Editor and not in the Build (WIndows Build). This only happens with the scenes that are baked. If I then manually add a light, it works fine. I guess the light information is gets deleted for that gameobject, not sure though.
NOTE: I am facing this issue only with baked scenes that were created in Unity version 5.6.1. Meanwhile, the scenes that are created in Unity version 2019.3.4 are working just fine.