unity开发相关环境(vs、MonoDevelop)windows平台编码问题
情景描述:最近在做Unity的网络底层,用VS编写源码,MonoDevelop用来Debug,在Flash Builder上搭建的Python做协议生成器,期间有无数次Unity莫名奇妙的的down掉了,然后仔细分析了一下:
1、unity会爆出错误:
There are inconsistent line endings in the 'Assets/...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.
2、monoDevelop在保存更改时也会报出编码错误:
The file "E:\BillGameframe\unity\...Netmanager\Netmanager.cs" has line endings which differ from the policy settings.
Do you want to convert the line endings?

3、然后用Notepad++的“显示所有字符” 查看文件,发现VS保存的文件每行以‘CRLF’结尾(window平台文件),而MonoDevelop保存的是‘LF’结尾(Unix平台)
4、然后用Unity新建c#文件,发现为‘LF’结尾(Unix平台)
解决方案:
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开发相关环境(vs、MonoDevelop)windows平台编码问题的更多相关文章
- (转)unity开发相关环境(vs、MonoDevelop)windows平台编码问题
转自: http://www.cnblogs.com/sevenyuan/archive/2012/12/06/2805114.html 1.unity会爆出错误: There are inconsi ...
- 重新学习ESP32(零)之环境搭建——转载——windows平台
原文来自:https://www.makingfun.xyz/2018/09/18/esp32-hello-world/ 前言 前几天看到乐鑫的公众号推送了一篇文章,说是ESP8266最新的SDK风格 ...
- Ubuntu开发相关环境搭建
一.Ubuntu系统语言环境切换修改 安装时,选择的中文版,但实际使用起来,很不爽,果断切换为英文 1.1 打开终端: vim /etc/default/locale 1.2 修改配置 LANG=&q ...
- windows平台编码转换
int AsciiToUtf8(char* pSrc, unsigned int nSrcLen, char* pBuffer, unsigned int nBufferLen) { assert(p ...
- [帖子收集]通用Windows平台(UWP)
通用Windows平台,universal windows platform,UWP 什么是通用 Windows 平台 (UWP) 应用?(微软MSDN) 如何在通用 Windows 平台应用中使用现 ...
- 为啥我喜欢在Windows 7环境下做Unity开发?
先说明,以下情况只针对本人哦~ 前阵子我在OSX的最新版本Mavericks下做Unity开发,后来我把MacbookPro卖了,自己组装了个PC搞开发,为啥呢? 1:OSX下 MonoDevelop ...
- 「C语言」在Windows平台搭建C语言开发环境的多种方式
新接触C语言,如何在Windows下进行C语言开发环境的搭建值得思考并整理. 以下多种开发方式择一即可(DEV C++无须环境准备). 注:本文知识来源于 Windows 平台搭建C语言集成开发环境 ...
- 如何在Windows平台使用VS搭建C++/Lua的开发环境
转自:http://ju.outofmemory.cn/entry/95358 本文主要介绍如何在Windows平台利用VS搭建C++/Lua开发环境.这里的“C++/Lua开发环境”主要指的是C++ ...
- 在Windows平台搭建C语言开发环境
一.在Windows平台搭建DEV C++集成开发环境 官网 https://sourceforge.net/projects/orwelldevcpp/ 中下载Dev C++运行即可 环境准 ...
随机推荐
- LintCode 77: 最长公共子序列
public class Solution { /** * @param A, B: Two string. * @return: the length of the longest common s ...
- js中使用new Date(str)创建时间对象不兼容firefox和ie的解决方式
/** * 解决 ie,火狐浏览器不兼容new Date(s) * @param strDate * 返回 date对象 * add by zyf at 2015年11月5日 */ function ...
- winfrom自定义滚动条
panel或图片什么的跟着鼠标走,这里panel自己可以加背景图或直接搞个图就行了.为了演示清楚,有个滚动条控件做对比,与自定义的同步. using System; using System.Coll ...
- 6个奇葩的(hello,world)C语言版(转)
//下面的所有程序都可以在GCC下编译通过,只有最后一个需要动用C++的编译器用才能编译通过. //程序功能输出 Hello,world! 01.c #define _________ } #de ...
- liunx常用的命令
计算机网络的主要优点是能够实现资源和信息的共享,并且用户可以远程访问信息.Linux提供了一组强有力的网络命令来为用户服务,这些工具能够帮助用户登录到远程计算机上.传输文件和执行远程命令等. 本章介绍 ...
- 快速安装Percona pt工具
yum install perl-DBI perl-DBD-MySQL perl-Time-HiRes perl-Time-HiRes perl-IO-Socket-SSLwget http://pk ...
- 关于Delphi错误:Cannot make a visible window modal
Delphi的fsMDIChild类型的窗体是不能使用ShowModal的,否则会弹出"Cannot make a visible window modal"异常, 但是把fsMD ...
- NPOI、MyXls、Aspose.Cells 导入导出Excel(转)
Excel导入及导出问题产生: 从接触.net到现在一直在维护一个DataTable导s出到Excel的类,时不时还会维护一个导入类.以下是时不时就会出现的问题: 导出问题: 如果是asp.net,你 ...
- QSort函数对不同类型数据快速排序浅谈
一.对int类型数组排序 int num[100]; int cmp ( const void *a , const void *b ){return *(int *)a - *(int *)b;} ...
- linux内核分析作业6:分析Linux内核创建一个新进程的过程
task_struct结构: struct task_struct { volatile long state;进程状态 void *stack; 堆栈 pid_t pid; 进程标识符 u ...