Visual Studio does not compile

I passed my Unity project to my colleague who is making animations and models, and when I reimported the project, Visual Studio 2019 does not compile the code, when I open it it doesn’t mind any typoes and I have to rely on Unity’s own compiler to know what is wrong, which is very inconvenient.

I also changed my computer in the mean time so this might be the reason.

                        if (MultiMuzzle)
                        {
                            Projectile = Instantiate(ProjectilePrefab, MuzzleTransformArray [CurrentMuzzle].position, MuzzleTransformArray [CurrentMuzzle].rotation).GetComponent<Rigidbody>();
                        }
                        else
                        {
                            Projectile = Instantiate(ProjectilePrefab, MuzzleTransform.position, MuzzleTransform.rotation).GetComponent<Rigidbody>();
                            ergfjuibegrtiyuoergbiedrtgog //Apparently Visual Studio thinks this is fine//
                        }

Sounds like a botched Visual Studio to Unity integration. Was Visual Studio installed via Unity?

1 Like

That was exactly it, I didn’t have the Visual Studio 2019 attached in the “External Tools” in Unity Preferences, sorry the trouble.