在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.问题解决的更多相关文章

  1. inconsistent line endings 解决方法

     I'm using Unity 3D in combination with Visual Studio 2008 on a Windows 7 64 bit system. When savi ...

  2. Unity3D脚本行尾(Line Endings)

    行尾不一致(inconsistent line endings ) 开发环境 有时候编辑Unity的脚本文件,代码diff之后,或者从svn更新文件之后,Unity中会出现行尾不一致的信息. 我的开发 ...

  3. inconsistent line count calculation in projection snapshot

    1.现象 在vs2013中,按Ctrl + E + D格式化.cshtml代码,vs2013系统崩溃.报:inconsistent line count calculation in projecti ...

  4. git 提交报错 : The file will have its original line endings in your working directory.

    报错现象 git  add . 的时候发现此报错 报错分析 看情况应该是不同系统对换行的识别不到位导致的 就常识来说文件是在windows下生成的所以换行和 linux 确实不同可能是因为这个导致的 ...

  5. 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. 当报这个警告时是 ...

  6. [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 ...

  7. 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 ...

  8. 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 ...

  9. 解决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 ...

随机推荐

  1. UIActivityIndicatorView的详细使用

    转自:http://www.cnblogs.com/top5/archive/2012/05/17/2506623.html UIActivityIndicatorView实例提供轻型视图,这些视图显 ...

  2. NGUI学习笔记(六):ScrollView、Grid和Table

    下面我们来看看游戏UI开发中比较核心的开发,我称为列表开发,比如背包和各种形式不一的列表等,下面我们来看几个具体的样例:   基本上就是一些重复的制作好的多个UI控件进行排列,同时可以支持滚动,当然, ...

  3. Django内置过滤器详解附代码附效果图--附全部内置过滤器帮助文档

    前言 基本环境 Django版本:1.11.8 Python版本:3.6 OS: win10 x64 本文摘要 提供了常用的Django内置过滤器的详细介绍,包括过滤器的功能.语法.代码和效果示例. ...

  4. CDN技术详解笔记

    1.影响网络传输的四个因素(1)“第一公里”:网站服务器接入互联网的链路所能提供的带宽.(2)“最后一公里”:用户接入带宽.(3)对等互联关口:不同网络之间的互联互通带宽.(4)长途骨干传输:首先是长 ...

  5. 给singer的左侧添加fixedTitle,并显示向上滚动偏移效果;

    1.将写好的dom绝对定位到顶部: 2.dom值为singerlist的currentIndex.title(通过计算属性获取),如果有则显示fixedTitle,没有则隐藏: 3.计算diff:当d ...

  6. Oracle数据库字符集问题解析

    Oracle数据库字符集问题解析 经常看到一些朋友问ORACLE字符集方面的问题,我想以迭代的方式来介绍一下.第一次迭代:掌握字符集方面的基本概念.有些朋友可能会认为这是多此一举,但实际上正是由于对相 ...

  7. tomcat Can't create cache file!

    ) at javax.imageio.ImageIO.write(ImageIO.java:1558) ... 119 more Caused by: java.io.IOException: 系统找 ...

  8. poi 抽取execl表面数据源代码工具

    开发中 ,导入导出execl避免不了数据类型格式的校验,在使用poi要使用抽取表面数据,poi暂时不支持单元格抽取,查询poi源码抽取工具类如下,如使用jxl就不必使用,jxl取出的单元格数据已是抽取 ...

  9. binutils工具集之---nm

    nm用于列出程序文件中的符号.建立nmtest.c文件: #include<time.h> int global1; ; static int static_global1; ; void ...

  10. dp之多维背包hdu2159

    二维背包问题,我是觉得这个题目数据比较水,虽然它最后说了怪可以无限个,但是它却只能最多杀s个,也就是所有品种的怪最多为s个,那么就是二维完全背包的问题了.......同时,它没有说一定要杀s只怪,所以 ...