Is it an error in Unity or does it interfere with the program?

1

This error appeared in Unity I would like to know what is wrong and how to solve it

  

There are inconsistent line endings in the 'Assets / Scripts / teste.cs'   script. Some are Mac OS X (UNIX) and some are Windows. This might lead   to incorrect line numbers in stacktraces and compiler errors. Many   text editors can fix this using Convert Line Endings menu commands.

    
asked by anonymous 29.01.2016 / 13:15

1 answer

2

As the message itself indicates, your teste.cs file (which is a text file containing lines of code) has inconsistent line terminations. It turns out that in Windows the termination of a line in a text file is indicated by two characters (CR + LF, which are the characters of carriage return and line feed ). In Unix only the LF is used, and in MAC only the CR is used.

The message also gives a hint about what might happen because of this inconsistency. Unity can display incorrect line numbers in log messages and / or compile error messages. They are not very serious problems. But since they can disrupt your debugging of other issues, it makes sense to fix them.

The message itself also indicates how to resolve them using a text editor. The Notepad ++ (totally free), for example, has an option to help with this. Open the file in Notepad ++, go to the "Edit" menu (or Edit ) and choose "End Line Conversion" (or EOL Conversion ) and select the operating system used (Windows or MAC, for example). Then save the file and reopen it normally on Unity.

    
29.01.2016 / 13:27