유니버설 Windows 앱에서 사용하는 .NET 스크립팅 백엔드는 해당 플랫폼의 특수 .NET 버전이며, Mono와는 완전히 호환되지 않습니다. 특히 몇몇 데이터 타입이 없는 경우가 있으며, 일부 클래스는 특정 메서드가 Mono에는 있더라도 없는 경우가 있습니다.
기존 게임을 유니버설 Windows 플랫폼으로 쉽게 포팅할 수 있도록 Unity는 몇몇 결여된 .NET 타입을 제공합니다. 또한 일부 확장 메서드와 교체 타입이 추가되어 포팅을 더욱 간편하게 합니다. 이들 타입은 PlaybackEngines\metrosupport\Managed\WinRTLegacy.dll에 있습니다.
아래는 Unity가 제공하는 타입 중 일부입니다.
이와 더불어 WinRTLegacy 네임스페이스가 추가되어 추가 클래스와 확장 메서드를 제공합니다. 아래는 그 예제입니다.
네임스페이스가 일치하지 않을 때 WinRTLegacy 교체 클래스를 사용하는 가장 간단한 방법은 아래와 같이 디렉티브를 사용하는 것입니다.
#if NETFX_CORE
using XmlReader = WinRTLegacy.Xml.XmlReader;
#else
using XmlReader = System.Xml.XmlReader;
#endif
이렇게 하면 다른 곳에 있는 유니버설 Windows 플랫폼과 System.Xml 네임스페이스의 WinRTLegacy.Xml에서 가져온 XmlReader 클래스를 사용할 수 있습니다.
• 2017–05–16 편집 리뷰 없이 페이지 수정됨
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.