r/unity • u/Breisach_tudor • Nov 21 '25
Question CRLF or LF?
I keep getting a ending line mixed error which is not important but annoying. In the reference scripts that unity has should i change it to LF format ,or CRLF?
1
Upvotes
2
u/Kosmik123 Nov 21 '25
CRLF is used in Windows. LF in Mac OS and Linux. Which OS do you use?
2
u/GroZZleR Nov 21 '25
CRLF is typical for Windows. LF is typical for Unix/Linux. I think older Mac's used just CR, but I'm not sure what they do nowadays.
Just sync the template with the settings in your code editor and you'll be OK.
2
u/Heroshrine Nov 21 '25
I use \n\r line endings and rarely get line ending changes, usually in scene files weirdly
2
u/DatenMuellMann Nov 21 '25
cmd/batch is still weird as fuck
1
u/AveaLove Nov 21 '25 edited Nov 21 '25
CRLF is '/r /n'. LF is just '/n'. All modern computers support both, and it's a hold over from typewriters when a carriage return was necessary to move the print head to the start of the line. I use LF because why bother with a carriage return that isn't necessary these days?