DataPrivacy
클래스는 플레이어의 개인정보 관리 선택 옵션에 따라 Unity 애널리틱스 서비스를 설정합니다.
네임스페이스: UnityEngine.Analytics
public class DataPrivacy
DataPrivacy
클래스는 플레이어의 개인정보 보호 설정을 가져와서 이에 기반하여 애널리틱스 서비스를 자동으로 설정합니다.
FetchPrivacyUrl()
함수를 사용하여 플레이어의 개인정보 관리 페이지의 URL을 가져옵니다. URL을 열고 플레이어에게 개인정보 보호 설정 관리 옵션을 제공합니다.
이 페이지에는 다음 함수에 대한 세부 정보가 나와 있습니다.
사용할 Data Privacy API를 준비합니다.
public static void Initialize()
이 함수는 숨겨진 게임 오브젝트를 만들고 DataPrivacy
클래스의 인스턴스를 게임 오브젝트의 컴포넌트로 추가합니다.
Unity 5.1 이전 버전에서는 애플리케이션을 시작할 때 UnityAnalytics.StartSDK (projectId)
를 호출한 직후 Initialize()
를 호출합니다. 최신 버전의 Unity에서는 Initialize()
가 자동으로 호출됩니다.
플레이어의 개인정보 관리 페이지의 URL을 가져옵니다.
public static void FetchPrivacyUrl(Action<string> success, Action<string> failure = null)
Action<String> success
— URL을 성공적으로 검색하여 가져오면 호출되는 액션 오브젝트. 액션에 전달되는 문자열에 URL이 포함됩니다.
[옵션] Action<String> failure
— Unity가 URL을 검색하여 가져올 수 없을 때 호출되는 액션 오브젝트. 액션에 전달되는 문자열에 실패 이유가 포함됩니다.
브라우저 또는 웹뷰에서 success
함수에 전달된 URL을 열고 플레이어에게 개인정보 보호 옵션을 관리할 기회를 제공합니다. Application.OpenURL()
을 사용하여 페이지를 열 수 있습니다.
URL은 일정 시간 동안만 유효합니다. 반드시 URL을 열기 직전에 URL을 가져와야 합니다.
2018–11–05 페이지 게시됨
개인정보 보호 버튼을 삽입하기 위한 에디터 메뉴 커맨드를 제거함. 개인정보 보호 버튼 프리팹을 추가함.
Unity 2018.1의 새로운 기능.
Unity 2018.3에서 FetchOptOutStatus 함수 제거됨
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.