diff --git a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/ShopLevelUp.cs b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/ShopLevelUp.cs index e2a3ca30..425e8683 100644 --- a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/ShopLevelUp.cs +++ b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/ShopLevelUp.cs @@ -7,6 +7,7 @@ using UniRx; using UnityEngine; using UnityEngine.PlayerLoop; using UnityEngine.UI; +using GameAnalyticsSDK; public class ShopLevelUp : MonoBehaviour { @@ -93,6 +94,13 @@ public class ShopLevelUp : MonoBehaviour LocalCacheManager.Load(CallbackTag, null)?.Invoke(); LocalCacheManager.Remove(CallbackTag); } +#if !DEVELOPMENT_BUILD && !UNITY_EDITOR + // 進捗計測 + var progress = "level_" + String.Format("{0:00}", shopLevel); + // 進捗スコアを保存 TODO:暫定的にログインカウントを保存する + var score = GameDataManager.GameData.dailyLoginCount; + GameAnalytics.NewProgressionEvent(GAProgressionStatus.Complete, progress, score); +#endif } public static void ShowDialog(int level, Action onComplete = null) diff --git a/popcorn/Assets/MyGame/Scripts/AdManager.cs b/popcorn/Assets/MyGame/Scripts/AdManager.cs index b9f72f54..c57d3aba 100644 --- a/popcorn/Assets/MyGame/Scripts/AdManager.cs +++ b/popcorn/Assets/MyGame/Scripts/AdManager.cs @@ -1,8 +1,16 @@ using System; using UnityEngine; +using GameAnalyticsSDK; public sealed class AdManager : SingletonMonoBehaviour { + public static readonly string AD_PLACEMENT_COIN = "coin"; + public static readonly string AD_PLACEMENT_CORNFIELD = "cornfield"; + public static readonly string AD_PLACEMENT_CUSTOMER = "increase_customer"; + public static readonly string AD_PLACEMENT_PERFECT = "perfect_popcorn"; + public static readonly string AD_PLACEMENT_VIP = "vip_customer"; + public static readonly string AD_PLACEMENT_AUTO = "auto_popcorn"; + //-- ironSource --// #if UNITY_IOS private static readonly string IRONSOURCE_APP_KEY = "11bc8b5ad"; @@ -107,7 +115,7 @@ public sealed class AdManager : SingletonMonoBehaviour { return IronSource.Agent.isRewardedVideoAvailable(); #endif } - public void ShowRewardVideo(Action callback){ + public void ShowRewardVideo(Action callback, string ad_placement = "none"){ #if UNITY_EDITOR callback(true); #else @@ -120,6 +128,9 @@ public sealed class AdManager : SingletonMonoBehaviour { _rewardAdClose = false; _async_frame_count = 0; IronSource.Agent.showRewardedVideo(); +#if !DEVELOPMENT_BUILD && !UNITY_EDITOR + GameAnalytics.NewAdEvent(GAAdAction.FailedShow, GAAdType.RewardedVideo, "ironsource", ad_placement); +#endif }else{ _rewardAdCallback(false); } diff --git a/popcorn/Assets/MyGame/Scripts/Const.cs b/popcorn/Assets/MyGame/Scripts/Const.cs index 3c8bea68..c0817599 100644 --- a/popcorn/Assets/MyGame/Scripts/Const.cs +++ b/popcorn/Assets/MyGame/Scripts/Const.cs @@ -4,7 +4,7 @@ public static class Const { public static readonly string UnityVersion = "2019.4.19f1"; - public static readonly string DefaultAppVersion = "0.1.0"; + public static readonly string DefaultAppVersion = "1.1.0"; // parameter public static readonly int DefaultMachineLevel = 1; diff --git a/popcorn/Assets/MyGame/Scripts/GetRewardDialog.cs b/popcorn/Assets/MyGame/Scripts/GetRewardDialog.cs index 88693f7a..2ad297e0 100644 --- a/popcorn/Assets/MyGame/Scripts/GetRewardDialog.cs +++ b/popcorn/Assets/MyGame/Scripts/GetRewardDialog.cs @@ -48,31 +48,31 @@ namespace MyGame.Scripts normalWindow.SetActive(true); coinObject.SetActive(true); messageText.text = ScriptLocalization.System.CoinMainMessage; - SetButtonAction(closeButton, okButton); + SetButtonAction(closeButton, okButton, AdManager.AD_PLACEMENT_COIN); break; case RewardType.CornField: normalWindow.SetActive(true); fertilizerObject.SetActive(true); messageText.text = ScriptLocalization.System.CornFieldMessage; - SetButtonAction(closeButton, okButton); + SetButtonAction(closeButton, okButton, AdManager.AD_PLACEMENT_CORNFIELD); break; case RewardType.IncreaseCustomer: normalWindow.SetActive(true); publicityObject.SetActive(true); messageText.text = ScriptLocalization.System.IncreaseCustomerMessage; - SetButtonAction(closeButton, okButton); + SetButtonAction(closeButton, okButton, AdManager.AD_PLACEMENT_CUSTOMER); break; case RewardType.PerfectPopcorn: normalWindow.SetActive(true); messageText.text = ScriptLocalization.System.PerfectPopcornMessage; - SetButtonAction(closeButton, okButton); + SetButtonAction(closeButton, okButton, AdManager.AD_PLACEMENT_PERFECT); break; default: throw new ArgumentOutOfRangeException(); } } - private void SetButtonAction(Button closeButton, Button okButton) + private void SetButtonAction(Button closeButton, Button okButton, string Placement) { closeButton.OnClickAsObservable().Take(1).Subscribe(_ => { @@ -96,7 +96,7 @@ namespace MyGame.Scripts LocalCacheManager.Remove(OkCallbackTag); } TransitionManager.Instance.UnloadScene(GameScenes.WatchMovieCoin); - }); + }, Placement); } else { diff --git a/popcorn/Assets/Resources/GameAnalytics/Settings.asset b/popcorn/Assets/Resources/GameAnalytics/Settings.asset index c2da2f6f..738443c0 100644 --- a/popcorn/Assets/Resources/GameAnalytics/Settings.asset +++ b/popcorn/Assets/Resources/GameAnalytics/Settings.asset @@ -32,8 +32,8 @@ MonoBehaviour: - d078eab3b8d4a6b44ccfb7d9258a8e0bddad1337 - 41e0f225a9f8751a3fc893cae6eb933df7d0214e Build: - - 1.0.1 - - 1.0.0 + - 1.1.0 + - 1.1.0 SelectedPlatformOrganization: - usaya - usaya @@ -174,7 +174,6 @@ MonoBehaviour: VerboseLogBuild: 0 UseManualSessionHandling: 0 SendExampleGameDataToMyGame: 0 - UseIMEI: 0 InternetConnectivity: 0 CustomDimensions01: [] CustomDimensions02: []