Unity Line Ending Mismatch Issues

So heres an issue that I’ve had with Unity for a long time. Ever create a new script, add some variables and functions to it and hit save, then all of a sudden Unity and Visual Studio are complaining about the line ending being a mix of linux and windows style? Well apparently its still an issue, but there is an easy fix for it now.

Back in the day, the only fix was to navigate into some weird folders hidden inside your Unity installation, and then manually edit all the template files for different types of scripts you will use and convert the line endings in them to your desired format.

However, there’s seems to be a quicker fix nowadays, and its built into Unity itself. Now why is this issue not fixed automatically? Who knows. Probably because most of the Unity devs most likely use Macs and so aren’t directly affected by this. But for the rest of us poor folk who either can’t afford a Mac or choose not to use one for moral reasons, it can be a bit of a pain.

But anyways here is the solution:

  1. In Unity goto Edit -> Project Settings-> EditorScreenshot 2018-05-23 09.45.56
  2. At the bottom of the list change the Line Endings for New Scripts Mode from Linux to Windows. You could also try OS Native.
    Screenshot 2018-05-23 09.46.05

And voila, you might not get line ending errors anymore, at least for new files.

This is where I found the solution.

Well good luck and thanks for coming.

 

Advertisements
Posted in Uncategorized | Leave a comment

Mega May Demo 0.1 is here!

Check it out!

https://gamejolt.com/games/megamay/294357

Posted in Uncategorized | Leave a comment

New Site Coming soon…

In case you noticed, my old blog service decided to stop being a thing anymore, but luckily I was looking into setting up a vps server today anyways. In the meantime this will be the site until I get things running over there.

Posted in Uncategorized | Leave a comment