There are inconsistent line endings in the 'xxx' script. Some are Mac OS X (UNIX) and some are Windo
2016-06-12 18:06
761 查看
在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平台)。由于换行编码不一致导致报以上警告。
将脚本文件换行编码统一改为“CR LF”就可以了。
用Visual Studio打开需要修改的文件,然后“文件->高级保存选项” 行尾选择“Windows (CR LF)”保存
将
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
相关文章推荐
- Windows下Code::Blocks使用CDB
- nlog 2.0 强制转换使用 4.0 版本
- js console对象
- Centos 安装ejabberd 非常详细步骤(看图就明白)
- 第7章 排序
- android 获取SIM卡状态全过程
- A. Bear and Five Cards
- fragment切换 报错 Fragment already added
- 表单增强与验证——提交按钮(禁用提交按钮)
- lintcode ----单词搜索
- centos6.5安装配置supervisor
- syslog
- 第6章 查找
- 通过注解在方法级别上使用拦截器做登录权限校验
- listview 加载或者刷新的时候报数组越界异常
- 第5章 图
- Spring Security 简介
- Mac 下安装ejabberd (XMPP服务器端)
- WPF Step By Step 自定义模板
- html的内联框架iframe