發表文章

目前顯示的是 11月, 2015的文章

[Unity] 透過 Soomla 來實做 In-app purchase,以Android 為例 (Google Billing Service) , 和 Admob 不相容問題處理

圖片
Soomla  Store 的 Assets Store Link https://www.assetstore.unity3d.com/en/#!/content/6103 但是上面這個連結的Plugin 已經太舊了,且上面Youtube 的教學影片也是舊的,所以建議還是直接到官方的github 比較正確https://github.com/soomla/unity3d-store 那就開始來啦 首先Android  APK 設定 (須設定可以上傳的 就是sign key 和  package name 要用真的) 去下載 plugin : http://library.soom.la/fetch/unity3d-store/1.9.2?cf=github 匯入剛下載plugin 到 Soomla 的設定 設定如下 Soomla Secret : 自行決定加密的key , Google Play API Key : 等下再輸入 到 google play Developer Console https://play.google.com/apps/publish/,新增一個應用程式,或是選擇一個應用程式 到 服務和API 選項,複製授權金鑰 然後把授權金鑰貼到 Soomla 的Google Play API Key 上 此時再到Google Console 的 應用程式商品建立商品 建立完成回到Unity 建立一個 Billing Assert C# Script <= 用來記錄商品的資訊  ( FOURHUNDMUFF_PACK_PRODUCT_ID   <== 這裡是要填入之前Google play 的商品ID  )  using UnityEngine ; using System . Collections ; using Soomla . Store ; using System ; using System . Collections . Generic ; public class GoodAssets : IStoreAssets { public VirtualCategory [ ] G