internal static AppStore TryTargetAndroidStore(AppStore target)
        {
            if (!target.IsAndroid())
            {
                throw new ArgumentException(string.Format("AppStore parameter ({0}) must be an Android app store", target));
            }

            if (target == AppStore.UDP)
            {
                if (!s_udpAvailable || (!IsUdpUmpPackageInstalled() && !IsUdpAssetStorePackageInstalled()) || !UdpSynchronizationApi.CheckUdpCompatibility())
                {
                    UdpInstaller.PromptUdpInstallation();
                    return(ConfiguredAppStore());
                }
            }

            ConfigureProject(target);
            SaveConfig(target);
            OnAndroidTargetChange?.Invoke(target);

            var targetString = Enum.GetName(typeof(AppStore), target);

            GenericEditorDropdownSelectEventSenderHelpers.SendIapMenuSelectTargetStoreEvent(targetString);

            return(ConfiguredAppStore());
        }
예제 #2
0
        void OnAndroidTargetChange(AppStore appStore)
        {
            if (!appStore.IsAndroid())
            {
                return;
            }

            var field = GetTagContainer(currentStoreSection) as IMGUIContainer;

            if (field != null && currentStoreTargetContainer != null && currentStoreTargetContainer.container == field)
            {
                currentStoreTargetContainer.index = BuildTargetGroup.Android.ToAppStores().IndexOf(appStore);
            }
        }