void Start() { #if UNITY_IOS placementID = iosPlacementID; #elif UNITY_ANDROID placementID = androidPlacementID; #endif #if UNITY_ANDROID // Android FANのテストデバイスIDを登録 if (androidFANHashedID != null && androidFANHashedID.Length > 0) { SDKTestUtil.AddFANTestDevice(androidFANHashedID); } #endif // ユーザ属性をセットします //var targeting = new VAMPUnitySDK.Targeting(); //targeting.Gender = userGender; //targeting.Birthday = new VAMPUnitySDK.Birthday(birthday.year, birthday.month, birthday.day); //VAMPUnitySDK.setTargeting(targeting); var vampConfiguration = VAMPUnitySDK.VAMPConfiguration.getInstance(); vampConfiguration.PlayerCancelable = vampConfig.playerCancelable; vampConfiguration.PlayerAlertTitleText = vampConfig.playerAlertTitleText; vampConfiguration.PlayerAlertBodyText = vampConfig.playerAlertBodyText; vampConfiguration.PlayerAlertCloseButtonText = vampConfig.playerAlertCloseButtonText; vampConfiguration.PlayerAlertContinueButtonText = vampConfig.playerAlertContinueButtonText; blk = Block.Title; isVampInitialized = false; logoCube = GameObject.Find("LogoCube"); logoCube.SetActive(false); isLoading = false; float scaleX = Screen.width / SCREEN_WIDTH; float scaleY = Screen.height / SCREEN_HEIGHT; float scale = scaleX < scaleY ? scaleX : scaleY; scaleV3 = new Vector3(scale, scale, 1.0f); matrix = Matrix4x4.TRS( new Vector2( (Screen.width - SCREEN_WIDTH * scale) / 2, (Screen.height - SCREEN_HEIGHT * scale) / 2 ), Quaternion.identity, scaleV3 ); width = Screen.width / scale; height = Screen.height / scale; sdkVersion = VAMPUnitySDK.SDKVersion(); appVersion = SDKTestUtil.GetAppVersion(); infos = SDKTestUtil.GetDeviceInfo(); // EU圏内からのアクセスか判定します // VAMPUnitySDK.isEUAccess((bool access) => { // AddMessage(string.Format("IsEUAccess {0}", access)); // Debug.Log("[VAMPUnitySDK] VAMPIsEUAccess: " + access); // if (access) // { // // TODO: ユーザに広告が個人に関連する情報を取得することの同意を求めます // // ユーザの入力を受け付けACCEPTEDまたはDENIEDをセットします // VAMPUnitySDK.setUserConsent(VAMPUnitySDK.ConsentStatus.ACCEPTED); // } // }); VAMPUnitySDK.setCoppaChildDirected(false); Debug.Log("[VAMPUnitySDK] Coppa:" + VAMPUnitySDK.isCoppaChildDirected()); }
void Start() { #if UNITY_IOS placementID = iosPlacementID; #elif UNITY_ANDROID placementID = androidPlacementID; #endif #if UNITY_ANDROID // Android FANのテストデバイスIDを登録 if (androidFANHashedID != null && androidFANHashedID.Length > 0) { SDKTestUtil.AddFANTestDevice(androidFANHashedID); } #endif // ユーザ属性をセットします var targeting = new VAMP.Targeting.Targeting { Gender = userGender, Birthday = new VAMP.Targeting.Birthday { Year = birthday.year, Month = birthday.month, Day = birthday.day } }; VAMP.Targeting.TargetingManager.SetTargeting(targeting); // COPPA対象ユーザかどうかを設定します VAMP.Privacy.PrivacySettings.SetChildDirected(childDirected); // GDPRの対象ユーザで特定の年齢未満であるかどうかを設定します。 if (underAgeOfConsent != VAMP.Privacy.UnderAgeOfConsent.Unknown) { VAMP.Privacy.PrivacySettings.SetUnderAgeOfConsent(underAgeOfConsent); } blk = Block.Title; logoCube = GameObject.Find("LogoCube"); logoCube.SetActive(false); isLoading = false; float scaleX = Screen.width / SCREEN_WIDTH; float scaleY = Screen.height / SCREEN_HEIGHT; float scale = scaleX < scaleY ? scaleX : scaleY; scaleV3 = new Vector3(scale, scale, 1.0f); matrix = Matrix4x4.TRS( new Vector2( (Screen.width - SCREEN_WIDTH * scale) / 2, (Screen.height - SCREEN_HEIGHT * scale) / 2 ), Quaternion.identity, scaleV3 ); width = Screen.width / scale; height = Screen.height / scale; sdkVersion = VAMP.SDK.SDKVersion; appVersion = Application.version; infos = SDKTestUtil.GetDeviceInfo(); //// EU圏内からのアクセスか判定します VAMP.SDK.IsEUAccess((bool access) => { AddMessage(string.Format("IsEUAccess {0}", access)); Debug.Log("[VAMPUnitySDK] IsEUAccess: " + access); if (access) { // TODO: ユーザに広告が個人に関連する情報を取得することの同意を求めます // ユーザの入力を受け付けACCEPTEDまたはDENIEDをセットします VAMP.Privacy.PrivacySettings.SetConsentStatus(VAMP.Privacy.ConsentStatus.Accepted); } }); }