Unity를 라이브러리 기능으로 사용하여 Windows 애플리케이션에 Unity 런타임 라이브러리를 통합할 수 있습니다.
이러한 기능을 사용하면 다음과 같은 Unity 기반 기능을 애플리케이션에 포함할 수 있습니다.
Unity 런타임 라이브러리는 컨트롤을 노출하여 애플리케이션 안에 콘텐츠를 로드하고, 활성화하고, 언로드하는 시기와 방법을 관리합니다.
Windows에서는 다음과 같은 방식으로 Unity 빌드를 애플리케이션에 임베드할 수 있습니다.
애플리케이션에서 Unity를 외부 빌드로 실행하고 -parentHWND
커맨드 라인 인자를 사용하여 Unity가 초기화하고 렌더링할 창을 지정합니다.이는 더 쉬운 옵션입니다.
기존 운영체제 프로세스에 Unity를 임베드합니다.이렇게 하려면 Win32 애플리케이션이 직접 로드할 수 있는 UnityPlayer.dll
을 호출합니다.엔트리 지점 서명은 다음과 같습니다.
extern "C" UNITY_API int UnityMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nShowCmd);
lpCmdLine
을 사용하여 모든 커맨드 라인 인자를 Unity로 전달합니다(예: 해상도, 작업 스레드, 부모 HWND를 컨트롤).이렇게 하면 프로세스 내에서 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.