Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Game Development

Stéphane Diez
Stéphane Diez
19,350 Points

There are inconsistent line endings in the 'Assets/Scripts/PlayerMovement.cs' script. Some are Mac OS X (UNIX) and some

There are inconsistent line endings in the 'Assets/Scripts/PlayerMovement.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.

This is my Warning in Unity3d 5 . I used Visual Studio to code. How can I fix this ?

My Script looks ok I think.

1 Answer

Stéphane Diez
Stéphane Diez
19,350 Points

Ok I found the right answer. If you have this Warning in Unity, : There are inconsistent line endings in the 'Assets/Scripts/PlayerMovement.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.

You should check close Visual Studio and start it again. At the beginning you get this window when you open a file: my screenshot/ image link

Here don't click Yes! You don't want to do this. Then the file works with the line endings in Unity3d 5. That worked for me.