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 trialJany Keochkerian
1,308 Points"There are inconsistent line endings in the 'Assets/Scripts/PlayerMovement.cs. Some are Mac OS X (UNIX) and some are Win
"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. "
2 Answers
Randy Eichelberger
445 Pointshttp://www.grebulon.com/software/stripem.php#download
Edit: So this is caused because Unix and Windows and Mac all have different ways they end lines. This addon fixes that for you in Visual Studio. I installed it and opened VS up and it had a popup that let me easily fix it.
timtyznenko
606 PointsIf I am in Windows, so I selected "convert all end lines to Windows"
Daniel Black
5,058 PointsI don't know if this helps; but, I had this same issue. I'm using Visual Studio 2017 along side Unity (2017.1.1f1 Personal) rather than the editor used in the video. After seeing the error in Unity and not being able to click the "run" button, I hit "debug" in Visual Studio. Eventually, a "solution" window popped up feeding me the same error description that Unity gave. It then gave me the option to standardize the line endings to any given platform. I chose Windows, and was then able to "run" the program in Unity. While this worked for my platform (Windows 10 Creator), I'm guessing that this isn't the best solution in a real world sample that you would like to port to any other platforms.
Jany Keochkerian
1,308 PointsJany Keochkerian
1,308 Pointsusing System.Collections; using System.Collections.Generic; using UnityEngine;
public class PlayerMovement : MonoBehaviour {
}