Is it a mistake in Unity or does it not interfere with the program?

Asked

Viewed 144 times

1

This error appeared in Unity would like to know what is error 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 Commands menu.

1 answer

2


As the message itself indicates, your file teste.cs (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 of line feed). In Unix only the LF is used, and in the MAC only the CR is used.

The message also gives a hint as to what might happen due to this inconsistency. Unity may display incorrect line numbers in log messages and/or build error messages. These are not very serious issues. But as they may hinder your debugging of other problems, it makes sense to correct 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, in English) and choose "Final Line Conversion" (or EOL Conversion, in English) and select the operating system used (Windows or MAC, for example). Then save the file and reopen it normally in Unity.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.