vs2013下将文件使用unix结束符保存

There are inconsistent line endings in the ‘Assets/Scripts/ui/Mail/MailPrefab.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.

原因是因为vs下使用 “CR LF”结尾(Windows平台), unity下默认使用”LF”结尾(Unix平台)。

vs下想改为使用LF结尾,打开需要修改的文件,然后“文件->高级保存选项” 行尾选择“Unix (LF)”保存。

对于我们工程数十个文件来说,这不是很优雅的解决方式,幸好早有先人提供更好的方案。

http://www.grebulon.com/software/stripem.php

这个vs插件,可以将项目中所有文件以 LF 结束符保存。

发表评论?

0 条评论。

发表评论


注意 - 你可以用以下 HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>