There are inconsistent line endings in the 'xxx' script. Some are Mac OS X (UNIX) and some are Windows.问题解决
在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)”保存
将Unity安装目录\Editor\Data\Resources\ScriptTemplates\目录下的所有文件用上面的方式修改换行编码,以后通过Unity3D编辑器创建的文件将默认以“CR LF”换行,一劳永逸。
参考资料:
http://www.cnblogs.com/sevenyuan/archive/2012/12/06/2805114.html
There are inconsistent line endings in the 'xxx' script. Some are Mac OS X (UNIX) and some are Windows.问题解决的更多相关文章
- inconsistent line endings 解决方法
I'm using Unity 3D in combination with Visual Studio 2008 on a Windows 7 64 bit system. When savi ...
- Unity3D脚本行尾(Line Endings)
行尾不一致(inconsistent line endings ) 开发环境 有时候编辑Unity的脚本文件,代码diff之后,或者从svn更新文件之后,Unity中会出现行尾不一致的信息. 我的开发 ...
- inconsistent line count calculation in projection snapshot
1.现象 在vs2013中,按Ctrl + E + D格式化.cshtml代码,vs2013系统崩溃.报:inconsistent line count calculation in projecti ...
- git 提交报错 : The file will have its original line endings in your working directory.
报错现象 git add . 的时候发现此报错 报错分析 看情况应该是不同系统对换行的识别不到位导致的 就常识来说文件是在windows下生成的所以换行和 linux 确实不同可能是因为这个导致的 ...
- The file will have its original line endings in your working directory.
在空仓库的情况下,add,出现一下问题 The file will have its original line endings in your working directory. 当报这个警告时是 ...
- [Git add . ] 遇到The file will have its original line endings in your working directory 解决办法
1.在新项目中使用[ git add . ]时出现: warning: LF will be replaced by CRLF in ...... The file will have its ori ...
- Git提交时提示‘The file will have its original line endings in your working directory’
Git提交时提示'The file will have its original line endings in your working directory' Git出现错误 git add -A ...
- windows10下git报错warning: LF will be replaced by CRLF in readme.txt. The file will have its original line endings in your working directory.
window10下使用git时 报错如下: $ git add readme.txtwarning: LF will be replaced by CRLF in readme.txt.The fil ...
- 解决git报错“The file will have its original line endings in your working directory”的方法
在执行命令 git commit --all -m '说明' 时报错“The file will have its original line endings in your working dir ...
随机推荐
- 简单了解一下c编译过程
大一的时候,学习c语言,用的是VC6.0.用了1年多,到后来了解了Linux,知道了gcc编译器,开始使用gcc Hello.c -o a.out 这样的命令进行编译.后来又学了gcc的一些其他的命令 ...
- ubuntu root权限
ubuntu-kylin@ubuntu-kylin:~$ sudo passwd root 输入新的 UNIX 密码: 重新输入新的 UNIX 密码: passwd:已成功更新密码 ubuntu-ky ...
- 黑客编程教程(一)了解Windows机制
第一节 了解Windows机制 Windows 是一个“基于事件的,消息驱动的”操作系统. 在Windows下执行一个程序,只要用户进行了影响窗口的动作(如改变窗口大小或移动.单击鼠标等)该动作就会触 ...
- dubbo注册zookeeper保错原因
我的zookeeper是安装在本地,用的默认端口2181,版本3.4.10.dubbo版本2.5.8.dubbo-demo-provider.xml配置文件修改为:<dubbo:registry ...
- [转]一步一步部署SSIS包图解教程
本文就SQL统计分析SSIS包的部署进行一次详细的部署图解教程,Sql Server Integration Services 提供了非常简单的部署工具,利用这些工具可以方便地将包文件(*.dtsx) ...
- mysql的onestart和start区别
在FreeBSD上安装了mysql5.7之后,启动mysql时报了如下的错误: root@tuhooo:~ # /usr/local/etc/rc.d/mysql-server start Canno ...
- PDNN安装与使用
在之前写的一文"关于PDNN.Theano.Numpy以及Scipy的安装"中介绍了Theano的安装, 下面简单的介绍一下PDNN的安装与使用,哎,这个从学习的角度来讲自己亲自动 ...
- Idea创建sbt项目
这篇文章开始演示如何使用sbt新建项目. 1. 新建,选择Scala,SBT 填写项目名称,Scala版本号等信息. 单击完成后,后台会一直处于下载依赖文件的状态,等吧.. 最终后台运行完成后的完整目 ...
- 对于REST中无状态(stateless)的一点认识(转)
在请求中传递SessionID被普遍认为是unRESTful的,而将用户的credentials包含在每个请求里又是一种非常RESTful的做法.这样一个问题经常会造成困扰.本文就REST的一些概念进 ...
- R语言实战实现基于用户的简单的推荐系统(数量较少)
R语言实战实现基于用户的简单的推荐系统(数量较少) a<-c(1,1,1,1,2,2,2,2,3,3,3,4,4,4,5,5,5,5,6,6,7,7) b<-c(1,2,3,4,2,3,4 ...