Unity Development Related environments (VS, MonoDevelop) Windows platform Coding issues

Source: Internet
Author: User

Scenario Description: Recently in the bottom of the network to do unity, with vs writing source code, MonoDevelop used to debug, built on the Flash Builder Python Protocol generator, there are countless times unity inexplicable wonderful down, Then analyze it carefully:

1. Unity will burst the error:

There is inconsistent line endings in the ' assets/...cs ' script. Some is Mac OS X (UNIX) and Some is Windows.

This might leads 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 will also report a coding error when saving changes:

The file "E:\BillGameframe\unity\...Netmanager\Netmanager.cs" has a line endings which differ from the policy settings.
Want to convert the line endings?

  

3, then use notepad++ "Show all characters" to view the file, found that the VS saved the file each line with ' CRLF ' End (window platform file), and MonoDevelop save ' LF ' End (Unix platform)

4. Create a new C # file with unity and find the end of ' LF ' (Unix platform)

  Solution:

1. Change unity new file to ' CRLF '

Change: C:\Program files\unity\editor\data\resources\scripttemplates\ 4 Unity New file template to ' CRLF ',

Modification method: With VS Open, in file-Advanced save option-line End Select window (CRLF);

  

2, modify the MonoDevelop Environment code:

Modification method: Project-solution option-source Code-code formatting-the next 3 file format of line endings are changed to Windows

  

Unity Development Related environments (VS, MonoDevelop) Windows platform Coding issues

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.