应该有不少人在用VS编写脚本时遇到过如下的警告信息
There are inconsistent line endings in the 'XXX' 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.
虽然并无什么大碍,但是影响心情啊,其实想要解决也很简单,进入你安装unity的文件夹“\Unity\Editor\Data\Resources\ScriptTemplates”,将里面所有的文件用VS打开,在主菜单中选择“File-Advanced Save Options”将Line endings改成“Windows(CR LF)”,这样再创建的脚本就不会存在这样的问题了。