Unity를 라이브러리로 사용하여 UWP(유니버설 Windows 플랫폼) 애플리케이션에 Unity 런타임 라이브러리를 통합할 수 있습니다.Unity 런타임 라이브러리는 API 컨트롤을 노출하여 다른 UWP 애플리케이션 안에 콘텐츠를 로드하고, 활성화하고, 언로드하는 시기와 방법을 관리합니다.
이러한 통합을 사용하면 다음과 같은 Unity 기반 기능을 UWP 애플리케이션에 포함할 수 있습니다.
Unity 런타임 라이브러리를 UWP 애플리케이션에 통합하려면 다음 단계를 완료하십시오.
그 결과 Unity는 Unity 런타임 라이브러리를 다른 UWP 애플리케이션에 임베드하는 데 사용할 수 있는 Visual Studio 프로젝트를 생성합니다.이 프로젝트는 Unity 프로젝트를 로드하기 위한 SwapChainPanel 설정이 포함된 MainPage.xaml
파일 형식의 일반 XAML UWP 프로젝트입니다.이 프로젝트를 Unity가 아닌 다른 애플리케이션 비즈니스 로직으로 확장하거나 바꿀 수 있습니다.
참고:MainPage.xaml
파일은 Unity 에디터에서 XAML 빌드 타입을 사용하여 UWP 앱을 빌드하는 경우에만 존재합니다.
SwapchainPanel을 사용할 경우 Unity는 다른 요소 위에 렌더링합니다.이를 통해 Unity가 아닌 다른 애플리케이션 콘텐츠 위에 투명한 배경을 가진 작은 오브젝트를 렌더링할 수 있습니다.이렇게 하려면 PlayerSettings.WSA-transparentSwapchain 옵션을 활성화합니다.Unity가 Application.Unload를 사용하여 로드할 때 Unity 엔진을 언로드하여 리소스를 회수할 수 있습니다.
다른 애플리케이션을 사용하여 Unity 빌드를 호스팅하는 경우, Unity가 런타임 수명 주기를 컨트롤하지 않으므로 빌드가 작동하지 않을 수 있습니다.또한 다음 제한 사항에 대해서도 알고 있어야 합니다.
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.