I don’t think this is a Unity problem but I am not sure. I’ve been working in Unity for a while now, comfortable with it, coding in VS2008 for C# and have not had any problems getting the code into Unity. Then I had to reformat my computer (only a few days after updating to Unity 3.0 but that had nothing to do with why I had to reformat), reinstalled everything, got all the updates, and now:
for (int i = 0; i < 3; i++)
{
Debug.Log("This line prints three times " + i);
Debug.Log(“This line only prints once”);
Debug.Log("That’s magic (This also prints three times) " + i);
}
In the loop above, the top and bottom Debug statements print just fine, the middle doesn’t. I’ve reverted to a backup of working code and it still does this, so its something to do with either Unity 3.0, the updates to Visual Studio 2008, or the updates to Windows its self. I’m pretty sure its not Unity just because Unity rocks and I can’t imagine this being something that would slip through, so any hints on what automatic updates I should skip, what might be causing this? Oh, and I tried typing the code straight in Unity, skipping Visual Studio all-together, so its probably not the Visual Studio updates - one of the service packs maybe? Help? I’ll reformat everything again tonight but without knowing what’s causing the problem I can’t really troubleshoot it very well.
(Of course, it may just be something odd about Debug.Log that I just never noticed, just worried there is something more subtle wrong and don’t want it to build up)