There are inconsistent line endings in the 'xxx' script. Some are Mac OS X (UNIX) and some are Windows
2017-08-22 22:44
459 查看
在Window上使用Visual Studio编辑Unity3D脚本时常会出现类似如下警告:
警告 1 There are inconsistent line endings in the 'Assets/DubugTest.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. 0 0 解决方案“UnityVS.TestUnityVS”?(1 个项目)
虽然不影响使用,但一堆警告信息着实让人不爽,继续往下看。
用Notepad2的“查看->显示换行编码"查看发现通过unity3d编辑器创建的脚本文件是以"LF"结尾(Unix平台),MonoDevelop IDE创建的也是以“LF”结尾(Unix平台),而直接用Visual Studio创建的文件是以“CR LF”结尾(Windows平台)。由于换行编码不一致导致报以上警告。
用Visual Studio打开需要修改的文件,然后“文件->高级保存选项” 行尾选择“Windows (CR LF)”保存
将
参考资料:
http://www.cnblogs.com/sevenyuan/archive/2012/12/06/2805114.html
转载自:http://blog.dou.li/There-are-inconsistent-line-endings-in-the-xxx-script-Some-are-Mac-OS-X-UNIX-and-some-are-Windows.html
警告 1 There are inconsistent line endings in the 'Assets/DubugTest.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. 0 0 解决方案“UnityVS.TestUnityVS”?(1 个项目)
虽然不影响使用,但一堆警告信息着实让人不爽,继续往下看。
用Notepad2的“查看->显示换行编码"查看发现通过unity3d编辑器创建的脚本文件是以"LF"结尾(Unix平台),MonoDevelop IDE创建的也是以“LF”结尾(Unix平台),而直接用Visual Studio创建的文件是以“CR LF”结尾(Windows平台)。由于换行编码不一致导致报以上警告。
解决办法
将脚本文件换行编码统一改为“CR LF”就可以了。用Visual Studio打开需要修改的文件,然后“文件->高级保存选项” 行尾选择“Windows (CR LF)”保存
将
Unity安装目录\Editor\Data\Resources\ScriptTemplates\目录下的所有文件用上面的方式修改换行编码,以后通过Unity3D编辑器创建的文件将默认以“CR LF”换行,一劳永逸。
参考资料:
http://www.cnblogs.com/sevenyuan/archive/2012/12/06/2805114.html
转载自:http://blog.dou.li/There-are-inconsistent-line-endings-in-the-xxx-script-Some-are-Mac-OS-X-UNIX-and-some-are-Windows.html
相关文章推荐
- There are inconsistent line endings in the 'xxx' script. Some are Mac OS X (UNIX) and some are Windo
- There are inconsistent line endings in the 'Assets/Scripts/Test.cs' script. Some are Mac OS X (UNIX)
- There are inconsistent line endings in the "XXX.cs" script
- There are inconsistent line endings in the 'Assets/Scripts/xxx.cs' script.
- Unity3D提示“XX,some are mac os x (unix) and some are windows”
- the line endings in the following file are not consistent.
- The line endings in the following file are not consistent.
- The line endings in the following file are not consistent.
- in the prefix, you've chosen, there are no KDE headers installed.
- Task 'XXX' not found in root project 'BuildDemo'. Some candidates are: 'dexProductDebug'解决方案.
- Fixing "There was a problem with the editor 'vi'" for Git on Mac OS X
- 关于eclipse下运行maven build报 No plugin found for prefix 'jetty' in the current project and in the plu gi
- 添加外键出现There are no primary or candidate keys in the referenced table ×××××的错误
- mysql: Character set 'utf8mb4' is not a compiled character set and is not specified in the '/usr/sha
- The difference between && and ; in the Linux command line
- [转] How to install the glut libraries and dll's into windows
- Windows 64-bit: The 'Program Files (x86)' and 'SysWOW64' folders explained
- No plugin found for prefix 'war' in the current project and in the plugin groups
- 【OC易错】Xcode5.0新建OS X下的cmd工程后出现编译错误clang: error: invalid version number in '-mmacosx-version-min=
- cl : Command line error D8016 : '/RTC1' and '/clr' command-line options are incompatible