Note: Gaming Services Analytics is now available as a preview package. Gaming Services Analytics is an improved offering that allows you to easily understand game performance and player behaviors so you can make strategic decisions. See the documentation.
AnalyticsEventTracker 컴포넌트를 사용하는 대신 AnalyticsEvent.Custom을 호출하여 스크립트를 통해 직접 커스텀 이벤트를 보낼 수 있습니다.
// Reference the Unity Analytics namespace
using UnityEngine.Analytics;
// Use this call for wherever a player triggers a custom event
AnalyticsEvent.Custom(string customEventName, IDictionary<string, object> eventData);
이름 | 유형 | 설명 |
---|---|---|
customEventName | 문자열 | 커스텀 이벤트의 이름입니다. 이름에는 “unity” 접두사를 포함할 수 없습니다. 이 접두사는 내부 Unity 애널리틱스 이벤트용입니다. |
eventData | dictionary | 커스텀 이벤트가 트리거될 때 Unity 애널리틱스에 전송되는 추가 파라미터입니다. eventData 키에는 “unity” 접두사를 포함할 수 없습니다. 이 접두사는 내부 Unity 애널리틱스 이벤트용입니다. |
다음 예제에서는 플레이어가 레벨에서 비밀 위치를 찾을 때 커스텀 이벤트를 전송합니다.
public void ReportSecretFound(int secretID){
AnalyticsEvent.Custom("secret_found", new Dictionary<string, object>
{
{ "secret_id", secretID },
{ "time_elapsed", Time.timeSinceLevelLoad }
});
}
2018–03–02 페이지 게시됨
2018–03–02 - 이 날짜를 기준으로 서비스가 Unity 5.2 이상 버전과 호환되지만, 버전 호환성은 변경될 수 있음
Unity 5.2의 새로운 기능
스탠다드 이벤트가 Unity 패키지로 추가됨