inconsistent line endings 解决方法
I'm using Unity 3D in combination with Visual Studio 2008 on a Windows 7 64 bit system.
When saving a cs file in Visual Studio and returning to Unity 3D I always get the following warning:
There are inconsistent line endings in the 'someFileName.cs' script. Some are Mac OS X (UNIX) and some are Windows.
This might lead to incorrect line numbers in stacktraces and compiler errors. Unitron and other text editors can fix this using Convert Line Endings menu commands.
I've seen that more people have this problem but they all are using OS X.
How can I fix this problem on my Windows machine?
UPDATE:
OK, I fixed the problem by replacing the NewBehaviourScript.cs that is located in Unity\Editor\Data\Resources
By creating a new script using Windows it contains only CrLf for new lines. So now when I create a new cs script in Unity and edit it in Visual Studio all the line endings are the same. So no more warnings
Create a new class in visual studio and set it up in the same way as the default NewBehaviourScript.cs.
Do not copy and paste as you will most likely copy the line endings too, thus undoing your efforts.
It is possible Unity does this so that other OS's & IDE's 'understand' the script too.
Line endings by the way are the characters that text editors interpret as a new line.
"/n" or "/r" for example.
inconsistent line endings 解决方法的更多相关文章
- 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 'Asse ...
- Module 'mysql' already loaded in Unknown on line 0解决方法
Module 'mysql' already loaded in Unknown on line 0解决方法 直接进入php.ini 把;extension=mysql.so注释掉就好了
- warning: a non-numeric value encountered in line *的解决方法
今天ytkah在调试项目的时候出现了一个警告warning: a non-numeric value encountered in line 694,查看php官方文档,上面解释说在使用(+ - * ...
- ORA-06502:at "WMSYS.WM_CONCAT_IMPL",line 30 解决方法整理
之前数据量少的时候,用:select wm_concat(字段) from 表 拼接数据量小的话,没有问题,数据量超出4000个就会爆以下错误信息: 解决方法(Oracle 函数xmlagg拼接): ...
- Warning: count(): Parameter must be an array or an object that implements Countable in line 302解决方法
ytkah在调试项目时又弹出一个警告Warning: count(): Parameter must be an array or an object that implements Countabl ...
- PHP错误Parse error: syntax error, unexpected end of file in test.php on line 12解决方法
出现这个错误的原因就是语法错误,肯定是PHP程序的书写不规范造成,PHP语句标识符错了,没有在php.ini中开启短标签!八成是这个原因,啊啊啊! 今天在写PHP程序的时候总是出现这样的错误:Pars ...
- python IDLE编程时遇到Python Error: Inconsistent indentation detected! 解决方法
仔细检查了几遍代码,发现indent没有错误! 之后试将所有indent都用空格代替,程序就跑起来了. 具体原因可能是IDLE环境内的Tab键有小bug.
- [php错误]PHP中Notice: unserialize(): Error at offset of bytes in on line 的解决方法
使用unserialize函数将数据储存到数据库的时候遇到了这个报错, 后来发现是将gb2312转换成utf-8格式之后, 每个中文的字节数从2个增加到3个之后导致了反序列化的时候判断字符长度出现了问 ...
- PHP中Notice: unserialize(): Error at offset of bytes in on line 的解决方法
使用unserialize函数将数据储存到数据库的时候遇到了这个报错,后来发现是将gb2312转换成utf-8格式之后,每个中文的字节数从2个增加到3个之后导致了反序列化的时候判断字符长度出现了问题, ...
随机推荐
- hihoCoder-1828 2018亚洲区预选赛北京赛站网络赛 A.Saving Tang Monk II BFS
题面 题意:N*M的网格图里,有起点S,终点T,然后有'.'表示一般房间,'#'表示毒气房间,进入毒气房间要消耗一个氧气瓶,而且要多停留一分钟,'B'表示放氧气瓶的房间,每次进入可以获得一个氧气瓶,最 ...
- POJ 2299 求逆序对个数 归并排序 Or数据结构
题意: 求逆序对个数 没有重复数字 线段树实现: 离散化. 单点修改,区间求和 // by SiriusRen #include <cstdio> #include <cstring ...
- week1 notebook1
初识Python 一.python介绍 - 解释器: cpython(默认使用) ipython(shell) jpython(java) ironpython rubypython - 编码: as ...
- T对象序列化后T对象中属性字段不见了?
序列化:JsonConvert.SerializeObject(T) 直接在类的上面添加[Table("表名")] 在类上添加属性[DataContract] 在属性上添加属性[D ...
- Cupid's Arrow[HDU1756]
Cupid's Arrow Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Tot ...
- (转载)android开发常见编程错误总结
首页 › 安卓开发 › android开发 android开发常见编程错误总结 泡在网上的日子 / 文 发表于2013-09-07 13:07 第771次阅读 android,异常 0 编辑推荐:稀 ...
- MongoDB 学习笔记(七):主从复制与副本集
一.主从复制 1.主从复制是一个简单的数据库同步备份的集群技术,如下图:要明确的知道主服务器与从服务器,且从服务器要明确的知道主服务器的存在. 2.在MongoDB中在启动数据库服务时,可以用mast ...
- Ubuntu 16.04 安装 Django==1.11.8
vim InStall-Django.sh #!/bin/bash rm -rf /usr/bin/python ln -s /usr/bin/python3 /usr/bin/python mkd ...
- JS 20180416作业
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...
- 洛谷P1850 换教室_数学期望_Floyd
调了一下午QAQ-让我对数学期望的理解又提升了一个层次. 首先,我们发现 v<=300v<=300v<=300 , 这样我们就可以用 FloydFloydFloyd 算法来 O(n3 ...