Unity 게임의 이벤트
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
이 주제에서는 Unity 게임에서 Play 게임즈 서비스 이벤트를 사용하는 방법을 설명합니다.
시작하기 전에
Unity 프로젝트와 Unity용 Google Play 게임즈 플러그인을 설정합니다. 자세한 내용은
시작 가이드를 참고하세요.
이벤트 만들기
Google Play Console에서 이벤트를 만듭니다. 자세한 내용은 Play 게임즈 서비스의 이벤트 가이드를 참고하세요. 이벤트를 만든 후 시작 가이드의 설명에 따라 Android 리소스를 플러그인에 추가합니다.
이벤트 기록
이벤트를 늘리려면 다음 메서드를 호출합니다.
using GooglePlayGames;
...
// Increments the event with Id "YOUR_EVENT_ID" by 1
PlayGamesPlatform.Instance.Events.IncrementEvent("YOUR_EVENT_ID", 1);
이 호출은 한 번만 실행하면 됩니다. 그러면 백그라운드에서 일괄 처리와 실행이 처리됩니다.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-07-27(UTC)
[null,null,["최종 업데이트: 2025-07-27(UTC)"],[],[],null,["# Events in Unity games\n\nThis topics describes how to use Play Games Services events in Unity\ngames.\n\nBefore you get started\n----------------------\n\nSet up your Unity project and the Google Play Games plugin for Unity. For\ndetails, see the [Get started guide](/games/pgs/unity/unity-start).\n\nCreate events\n-------------\n\nYou create events in Google Play Console. For details, see the\n[events guide](/games/pgs/events#create-event) for Play Games Services. After\nyou create your events, add their Android resources to the plugin as described\nin the [get started guide](/games/pgs/unity/unity-start).\n\nRecord events\n-------------\n\nTo increment an event, call the following method: \n\n using GooglePlayGames;\n ...\n // Increments the event with Id \"YOUR_EVENT_ID\" by 1\n PlayGamesPlatform.Instance.Events.IncrementEvent(\"YOUR_EVENT_ID\", 1);\n\nYou only need to make this call once. It handles batching and execution in the\nbackground."]]