unity会爆出错误:
There are inconsistent line endings in the ‘Assets/…cs’ script. Some are Mac OS X (UNIX) and some are Windows.
解决方案:
1、将unity新建文件改为‘CRLF’
将:C:\Program Files\Unity\Editor\Data\Resources\ScriptTemplates\下4个unity新建文件的模板改为‘CRLF’,
修改方法:用VS打开,在文件-高级保存选项-行尾 选择window(CRLF);
2、修改MonoDevelop环境编码:
修改方法:Project-Solution Option-Source Code-Code Formatting- 下3个文件格式的Line endings都改为Windows

本文详细介绍了如何解决Unity脚本中出现的不一致换行符问题,包括修改新建文件模板为CRLF以及调整MonoDevelop环境编码。
730

被折叠的 条评论
为什么被折叠?



