Exemplo n.º 1
0
        protected override Dictionary <string, UM_iProduct> GetServerProductsInfo()
        {
            var products = new Dictionary <string, UM_iProduct>();

#if UNITY_EDITOR
            switch (UnityEditor.EditorUserBuildSettings.activeBuildTarget)
            {
            case UnityEditor.BuildTarget.Android:
                foreach (var product in AN_Settings.Instance.InAppProducts)
                {
                    UM_AndroidProduct p = new UM_AndroidProduct();
                    p.Override(product);
                    products.Add(p.Id, p);
                }
                break;

            default:
                foreach (var product in ISN_Settings.Instance.InAppProducts)
                {
                    UM_IOSProduct p = new UM_IOSProduct();
                    p.Override(product);
                    products.Add(p.Id, p);
                }
                break;
            }
#endif

            return(products);
        }
        protected override Dictionary <string, UM_iProduct> GetServerProductsInfo()
        {
            var products = new Dictionary <string, UM_iProduct>();

            foreach (var product in AN_Billing.Inventory.Products)
            {
                UM_AndroidProduct p = new UM_AndroidProduct();
                p.Override(product);

                products.Add(p.Id, p);
            }
            return(products);
        }
Exemplo n.º 3
0
        protected override Dictionary <string, UM_iProduct> GetServerProductsInfo()
        {
            var products = new Dictionary <string, UM_iProduct>();

            foreach (var product in m_Products)
            {
                var p = new UM_AndroidProduct();
                p.Override(product);

                if (products.ContainsKey(p.Id))
                {
                    Debug.LogError("Skipping duplicated id for product " + p.Id + " check your settings!");
                    continue;
                }
                products.Add(p.Id, p);
            }
            return(products);
        }