There are inconsistent line endings in the 'Assets/Scripts/xxx.cs' script.
来源:互联网 发布:php 延迟执行 编辑:程序博客网 时间:2024/05/29 16:04
今天在Windows上使用VS2015座Unity3D开发,写了个C#脚本之后还没运行在UnIty里面就提示这个
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
这句话大概意思是说“当前这个代码文件的行尾标志不一致,一些是Mac OS X (UNIX),另外一些是Windows的 .... ”后面的内容没用,这个警告基本感觉也不影响编译和运行,但是本着一个严谨的态度= =,还是解决为好。
错误原因:
当使用NotePad++打开,设置“显示换行编码”的时候我们就能发现,在自己写的代码中,编译器中每行代码换行的时候什么都没有,但是在这里却看到了换行符号,通过Unity3D编辑器创建的脚本文件是以"LF"结尾(Unix平台),MonoDevelop IDE创建的也是以“LF”结尾(Unix平台),而直接用Visual Studio创建的文件是以“CR LF”结尾(Windows平台)
解决方案:
使用VS打开报出警告的文件,“文件->高级保存选项”进行如下操作就行啦:
在查阅资料的时候还看到了一劳永逸的方法不过没试过,我也贴出来:将Unity安装目录\Editor\Data\Resources\ScriptTemplates\
目录下的所有文件用上面的方式修改换行编码,以后通过Unity3D编辑器创建的文件将默认以“CR LF”换行
- There are inconsistent line endings in the 'Assets/Scripts/xxx.cs' script.
- There are inconsistent line endings in the "XXX.cs" script
- 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' script. Some are Mac OS X (UNIX) and some are Windo
- There are inconsistent line endings in the 'xxx' script. 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.
- Inconsistent Line Endings
- Inconsistent Line Endings
- inconsistent line endings 解决方法
- visual studio->Inconsistent Line Endings
- VC中忽略Inconsistent Line Endings提示带来的问题
- There are no datanodes in the cluster
- There are no datanodes in the cluster
- There Are Only Four Jobs in the Whole World – Are You in the Right One?
- There are 2 audio listeners in the scene.的问题
- git commit时出现的问题The file will have its original line endings in your working directory
- XGBoost资料( 多届竞赛冠军获得者 周耀 整理)
- B2C垂直电商细分
- Centos6.8 python2.6升级至2.7,并安装setuptools和pip
- BZOJ 2599: [IOI2011]Race 点分治题解
- mysql 数据备份与还原
- There are inconsistent line endings in the 'Assets/Scripts/xxx.cs' script.
- 【spring bean】spring中bean的懒加载和depends-on属性设置
- LMS100-1000激光雷达学习(一)
- cookie记录上次访问时间
- 其他智能平台接入HOMEKIT智能平台的解决方案
- 作为潮汕人你了解肠粉么 附带家常肠粉做法
- Android 判断系统默认存储位置是“内置存储卡”还是“SD卡”
- 史上最详细的vsftpd配置文件讲解
- 本地如何搭建IPv6环境测试你的APP ---