I would like to tell you about a problem I encountered with the Unity game engine. As a result, I couldn’t find the solution on the internet for a long time. But I finally got it done. The reason I share this problem here is to help friends who have the same problem in the future. If the solutions in other areas did not work for you, this solution will probably help you.
This was exactly the problem: I was getting the “Microsoft Visual C++ Runtime Library Error!” error when trying to bake the lightmap in Unity.
My computer uses windows 10, 64-bit operating system. For this reason, I installed the latest version of Microsoft Visual C++ x64. According to the information I read somewhere, it is enough to install only the x86 version on x86 systems. Since my system is x64, I need to install both x64 and x86. I installed a Microsoft Visual C++ x64 and an 86 on the computer. This issue has been resolved.
I don’t know about it, but I tried baking the lights on the 2021 version, this problem appeared. I said maybe there is a bug in the 2021 version. I installed the 2020 version and tried it. Same thing happened. I tried many solutions written on the internet, the problem was not solved. I installed the computer next to x64 and also x86. It’s been two days and the problem seems to be resolved.