Considerations for using the C # language in unity to publish normally in the development environment and to report that data types do not support errors

Source: Internet
Author: User

Windows Store apps:missing. NET typessuggest A change success!

Thank for helping us improve the quality of Unity documentation. Although we cannot accept all submissions, we do read the suggested change from our users and would make updates where app Licable.

Closesumbission failed

For some reason your suggested the change could isn't be submitted. Please try again in a few minutes. And thank taking the time to help us improve the quality of Unity documentation.

CloseYour name Your EmailSuggestion * <textarea id="suggest_body" class="req"></textarea>Submit Suggestion

Cancel

On the Windows Store Apps Microsoft. NET is used instead of Mono. There is a special. NET version for this platform, which is not entirely compatible with Mono.

In particular some data types is missing and some other classes don ' t has certain methods, that the same classes does have In Mono.

To make porting existing games to Windows Store Apps easier, some of the missing. NET types is provided by Unity. In addition some extension methods and replacement types were added to make migration easier.

Types, provided by Unity include:

    • System.Collections.ArrayList
    • System.Collections.Hashtable
    • System.Collections.Queue
    • System.Collections.SortedList
    • System.Collections.Stack
    • System.Collections.Specialized.HybridDictionary
    • System.Collections.Specialized.ListDictionary
    • System.Collections.Specialized.NameValueCollection
    • System.Collections.Specialized.OrderedDictionary
    • System.Collections.Specialized.StringCollection
    • System.IO.Directory
    • System.IO.File
    • System.IO.FileStream
    • System.Xml.XmlDocument
    • System.Xml.XmlTextReader
    • System.Xml.XmlTextWriter

In addition to these a namespace winrtlegacy are added to provide additional classes and extention methods. Among there is:

    • Extention Methods Close () for most System.IO classes (alternatively-can use Dispose (), which-available on both Mono and. NET for Windows Store Apps)
    • Winrtlegacy.typeextensions have methods GetConstructor (), GetMethod (), GetProperty () for System.Type
    • WinRTLegacy.IO.StreamReader class, that's compatible with Mono System.IO.StreamReader
    • WinRTLegacy.IO.StreamWriter class, that's compatible with Mono System.IO.StreamWriter
    • WinRTLegacy.Xml.XmlReader class, that's compatible with Mono System.Xml.XmlReader
    • WinRTLegacy.Xml.XmlWriter class, that's compatible with Mono System.Xml.XmlWriter

The simplest the replacement classes from Winrtlegacy is via using the directive:

#if NETFX_COREusing XmlReader = WinRTLegacy.Xml.XmlReader;#elseusing XmlReader = System.Xml.XmlReader;#endif

Reference URL: http://docs.unity3d.com/Manual/windowsstore-missingtypes.html

Considerations for using the C # language in unity to publish normally in the development environment and to report that data types do not support errors

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.