NetworkManagerHUD 를 사용하여 Unity 멀티플레이어 서비스를 통합하려면 다음 절차를 따라야 합니다.
빈 게임 오브젝트를 씬에 만듭니다.
NetworkManager 및 NetworkManagerHUD 컴포넌트를 빈 게임 오브젝트에 추가합니다. 이 오브젝트가 무엇인지 알 수 있도록 이름을 “Network Manager”로 바꿉니다.
플레이어를 나타내는 프리팹을 만듭니다. 게임에 연결된 플레어어가 각각 이 프리팹의 인스턴스를 하나씩 제어합니다.
NetworkIdentity 및 NetworkTransform 컴포넌트를 플레이어 프리팹에 추가합니다. NetworkTransform 컴포넌트가 플레이어 게임 오브젝트의 움직임을 동기화합니다. 플레이어가 움직이지 않는 게임을 만드는 경우 이 컴포넌트는 불필요합니다.
인스펙터에서 플레이어 프리팹을 Network Manager 의 Player Prefab 프로퍼티에 추가합니다.
프로젝트를 빌드하고 실행합니다. 네트워크 관리자 HUD가 게임 메뉴를 보여줍니다. Enable Match Maker 를 클릭합니다.
룸 이름을 선택하고 호스팅 애플리케이션에서 Create Internet Match 를 클릭합니다.
프로젝트 인스턴스를 더 많이 실행하고 해당 클라이언트에서 Find Internet Match 를 클릭합니다. 이제 룸 이름이 표시됩니다.
Join Match 를 클릭합니다. 이제 플레이어가 동일한 매치에 연결되어야 합니다.
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.