facebook twitter hatena line email

「Unity/課金/インストール」の版間の差分

提供: 初心者エンジニアの簡易メモ
移動: 案内検索
(Android(Google)を使う場合)
(Android(Google)を使う場合)
(同じ利用者による、間の6版が非表示)
行3: 行3:
  
 
==Unityで課金サービスをONに==
 
==Unityで課金サービスをONに==
#unityメニュー/windows/Services/ In-App Purchasing を選択
+
#unityメニュー/windows/General/Services/ In-App Purchasing を選択(2019.2とかだと、Generalは省略されるかもしれない)
#import(googleやappleなどのプラグイン)ボタンをクリックする
+
#welcomeの項目にあるimport(googleやappleなどのプラグイン)ボタンをクリックする
  
 
==Android(Google)を使う場合==
 
==Android(Google)を使う場合==
#GooglePublicKeyはGooglePlayDeveloperページの全てのアプリ/該当アプリ/サービスとAPI/ライセンスとアプリ内課金にあるので貼り付ける
+
#GooglePublicKeyはGooglePlayDeveloperページの全てのアプリ/該当アプリ/収益化/収益化のセットアップ/ライセンスにRSA鍵の392文字の文字列があるので貼り付ける
 
#unityメニュー/Window/Unity IAP/Receipt Validation Obfuscator からGooglePublicKeyを設定すると、generated/GooglePlayTangle.csができる。
 
#unityメニュー/Window/Unity IAP/Receipt Validation Obfuscator からGooglePublicKeyを設定すると、generated/GooglePlayTangle.csができる。
  
 
===please enter your google public key for this application to ensure revenue numbers reflect verflect verified payments for googleはエラーが出るとき===
 
===please enter your google public key for this application to ensure revenue numbers reflect verflect verified payments for googleはエラーが出るとき===
#GooglePublicKeyはGooglePlayDeveloperページの全てのアプリ/該当アプリ/サービスとAPI/ライセンスとアプリ内課金にあるので貼り付ける
+
#GooglePublicKeyはGooglePlayDeveloperページの全てのアプリ/該当アプリ/収益化/収益化のセットアップ/ライセンスにRSA鍵の392文字の文字列があるので貼り付ける
  
 
===generated/GooglePlayTangle.csがないとエラーが出る時===
 
===generated/GooglePlayTangle.csがないとエラーが出る時===
行19: 行19:
 
com.android.vending.BILLING が追加される
 
com.android.vending.BILLING が追加される
  
 +
===GooglePlayPurchasingが見つからないエラーが出るとき===
 +
以下エラーが出るとき
 +
<pre>
 +
NotSupportedException: Failed to bind to native store: UnityEngine.AndroidJavaException: java.lang.ClassNotFoundException: com.unity.purchasing.googleplay.GooglePlayPurchasing
 +
</pre>
 +
unityメニュー/windows/General/Services/ In-App Purchasing からライブラリをONにしてwelcomeのところimportすると以下のファイルが追加される。
 +
<pre>
 +
Assets/Plugins/UDP/Android/udp.aar
 +
Assets/Plugins/UDP/Android/udp.aar.meta
 +
Assets/Plugins/UDP/Android/udpsandbox.aar
 +
Assets/Plugins/UDP/Android/udpsandbox.aar.meta
 +
Assets/Plugins/UDP/Android/utils.aar
 +
Assets/Plugins/UDP/Android/utils.aar.meta
 +
Assets/Plugins/UnityPurchasing/Bin/Android/AmazonAppStore.aar
 +
Assets/Plugins/UnityPurchasing/Bin/Android/AmazonAppStore.aar.meta
 +
Assets/Plugins/UnityPurchasing/Bin/Android/CloudMoolah.aar
 +
Assets/Plugins/UnityPurchasing/Bin/Android/CloudMoolah.aar.meta
 +
Assets/Plugins/UnityPurchasing/Bin/Android/GoogleAIDL.aar
 +
Assets/Plugins/UnityPurchasing/Bin/Android/GoogleAIDL.aar.meta
 +
Assets/Plugins/UnityPurchasing/Bin/Android/GooglePlay.aar
 +
Assets/Plugins/UnityPurchasing/Bin/Android/GooglePlay.aar.meta
 +
Assets/Plugins/UnityPurchasing/Bin/Android/SamsungApps.aar
 +
Assets/Plugins/UnityPurchasing/Bin/Android/SamsungApps.aar.meta
 +
Assets/Plugins/UnityPurchasing/Bin/Android/common.aar
 +
Assets/Plugins/UnityPurchasing/Bin/Android/common.aar.meta
 +
Assets/Plugins/UnityPurchasing/Bin/Editor.dll
 +
Assets/Plugins/UnityPurchasing/Bin/Stores.dll
 +
Assets/Plugins/UnityPurchasing/ETag
 +
</pre>
 +
 +
==iOSを使う場合==
 
===iosのアプリサイズ===
 
===iosのアプリサイズ===
圧縮時のサイズが61.2MB から62.2MB と1MB増えてた。
+
圧縮時のサイズが61.2MB から62.2MB と1MB増えてた。(demo含んでる)
  
 
==参考==
 
==参考==
 
https://docs.unity3d.com/ja/current/Manual/UnityIAPSettingUp.html
 
https://docs.unity3d.com/ja/current/Manual/UnityIAPSettingUp.html

2021年3月15日 (月) 03:23時点における版

マニュアル

公式マニュアル:https://docs.unity3d.com/ja/current/Manual/UnityIAP.html

Unityで課金サービスをONに

  1. unityメニュー/windows/General/Services/ In-App Purchasing を選択(2019.2とかだと、Generalは省略されるかもしれない)
  2. welcomeの項目にあるimport(googleやappleなどのプラグイン)ボタンをクリックする

Android(Google)を使う場合

  1. GooglePublicKeyはGooglePlayDeveloperページの全てのアプリ/該当アプリ/収益化/収益化のセットアップ/ライセンスにRSA鍵の392文字の文字列があるので貼り付ける
  2. unityメニュー/Window/Unity IAP/Receipt Validation Obfuscator からGooglePublicKeyを設定すると、generated/GooglePlayTangle.csができる。

please enter your google public key for this application to ensure revenue numbers reflect verflect verified payments for googleはエラーが出るとき

  1. GooglePublicKeyはGooglePlayDeveloperページの全てのアプリ/該当アプリ/収益化/収益化のセットアップ/ライセンスにRSA鍵の392文字の文字列があるので貼り付ける

generated/GooglePlayTangle.csがないとエラーが出る時

  1. unityメニュー/Window/Unity IAP/Receipt Validation Obfuscator からGooglePublicKeyを設定する

権限

com.android.vending.BILLING が追加される

GooglePlayPurchasingが見つからないエラーが出るとき

以下エラーが出るとき

NotSupportedException: Failed to bind to native store: UnityEngine.AndroidJavaException: java.lang.ClassNotFoundException: com.unity.purchasing.googleplay.GooglePlayPurchasing

unityメニュー/windows/General/Services/ In-App Purchasing からライブラリをONにしてwelcomeのところimportすると以下のファイルが追加される。

Assets/Plugins/UDP/Android/udp.aar
Assets/Plugins/UDP/Android/udp.aar.meta
Assets/Plugins/UDP/Android/udpsandbox.aar
Assets/Plugins/UDP/Android/udpsandbox.aar.meta
Assets/Plugins/UDP/Android/utils.aar
Assets/Plugins/UDP/Android/utils.aar.meta
Assets/Plugins/UnityPurchasing/Bin/Android/AmazonAppStore.aar
Assets/Plugins/UnityPurchasing/Bin/Android/AmazonAppStore.aar.meta
Assets/Plugins/UnityPurchasing/Bin/Android/CloudMoolah.aar
Assets/Plugins/UnityPurchasing/Bin/Android/CloudMoolah.aar.meta
Assets/Plugins/UnityPurchasing/Bin/Android/GoogleAIDL.aar
Assets/Plugins/UnityPurchasing/Bin/Android/GoogleAIDL.aar.meta
Assets/Plugins/UnityPurchasing/Bin/Android/GooglePlay.aar
Assets/Plugins/UnityPurchasing/Bin/Android/GooglePlay.aar.meta
Assets/Plugins/UnityPurchasing/Bin/Android/SamsungApps.aar
Assets/Plugins/UnityPurchasing/Bin/Android/SamsungApps.aar.meta
Assets/Plugins/UnityPurchasing/Bin/Android/common.aar
Assets/Plugins/UnityPurchasing/Bin/Android/common.aar.meta
Assets/Plugins/UnityPurchasing/Bin/Editor.dll
Assets/Plugins/UnityPurchasing/Bin/Stores.dll
Assets/Plugins/UnityPurchasing/ETag

iOSを使う場合

iosのアプリサイズ

圧縮時のサイズが61.2MB から62.2MB と1MB増えてた。(demo含んでる)

参考

https://docs.unity3d.com/ja/current/Manual/UnityIAPSettingUp.html