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.

时间: 2024-10-07 07:30:12

inconsistent line endings 解决方法的相关文章

[php错误]PHP中Notice: unserialize(): Error at offset of bytes in on line 的解决方法

使用unserialize函数将数据储存到数据库的时候遇到了这个报错, 后来发现是将gb2312转换成utf-8格式之后, 每个中文的字节数从2个增加到3个之后导致了反序列化的时候判断字符长度出现了问题, 所以需要使用正则表达式将序列化的数组中的表示字符长度的值重新计算一遍,代码如下: function mb_unserialize($serial_str) { $out = preg_replace('!s:(\d+):"(.*?)";!se', "'s:'.strlen(

PHP错误Parse error: syntax error, unexpected end of file in test.php on line 12解决方法

今天在写PHP程序的时候总是出现这样的错误:Parse error: syntax error, unexpected end of file in *.php on line *,然后我就根据提示,找到那个文件,然后错误中总是提示最后一行出错,我找到最后一行发现是</html>,晕的,这能有什么错误,找了好久才找到问题所在,拿来分享. 出现这个错误的原因就是语法错误,肯定是PHP程序的书写不规范造成,我后来一条一条看才发现,原来是PHP语句标识符错了,正常情况下应该是这样的:<?php

PHP中Notice: unserialize(): Error at offset of bytes in on line 的解决方法

使用unserialize函数将数据储存到数据库的时候遇到了这个报错,后来发现是将gb2312转换成utf-8格式之后,每个中文的字节数从2个增加到3个之后导致了反序列化的时候判断字符长度出现了问题,所以需要使用正则表达式将序列化的数组中的表示字符长度的值重新计算一遍,代码如下: function mb_unserialize($serial_str) { $out = preg_replace_callback( '!s:(\d+):"(.*?)";!s', function($r)

Parse error: syntax error, unexpected end of file in *.php on line * 解决方法

Parse error: syntax error, unexpected end of file in *.php on line * 解决方法 这篇文章主要介绍了PHP错误Parse error: syntax error, unexpected end of file in test.php on line 12解决方法,需要的朋友可以参考下 今天在写PHP程序的时候总是出现这样的错误:Parse error: syntax error, unexpected end of file in

require(): open_basedir restriction in effect. 解决方法

在linux服务器部署thinkphp5的时候PHP报了这个错误, 如下: Warning: require(): open_basedir restriction in effect. File(/www/wwwroot/zhuyuyun/thinkphp/start.php) is not within the allowed path(s): (/www/wwwroot/zhuyuyun/public/:/tmp/:/proc/) in /www/wwwroot/zhuyuyun/publ

Multiple markers at this line @Override的解决方法

使用Eclipse 进行项目开发,在实现类中的方法前面如果添加@Override就提示"Multiple markers at this line"的错误,问题描述如下 Multiple markers at this line - The method getStudentByID(String) of type StudentBeanImpl must override a superclass method - implements mgr.jc.student.service.

python3 安装scrapy Exception: Traceback (most recent call last): File &quot;/usr/lib/python3/dist-packages/pip/req/req_install.py&quot;, line 1006, in check_if_exists解决方法

错误代码: Exception: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/pip/req/req_install.py", line 1006, in check_if_exists self.satisfied_by = pkg_resources.get_distribution(str(no_marker)) File "/usr/share/python-wheel

PHP Warning: Module &#39;modulename&#39; already loaded in Unknown on line 0 的解决方法

今天无间断服务加载php-fpm时,爆出了一个错误:PHP Warning:  Module 'xhprof' already loaded in Unknown on line 0 <br /> 从英文可以看出PHP的扩展xhprof已经加载了,所以就查看php.ini,搜索xhprof.so发现有两个,删除其中一个,然后无间断服务加载php-fpm就解决了该问题. PHP Warning: Module 'modulename' already loaded in Unknown on l

/bin/bash: line 0: fg: no job control一般解决方法

測试版本号:CDH5.0,(Hadoop2.3) 在使用windows调用Hadoop yarn平台的时候,一般都会遇到例如以下的错误: 2014-05-28 17:32:19,761 WARN org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor: Exception from container-launch with container ID: container_1401177251807_0034_01_0