Hello, I am creating a VR version of my e-commerce website. I sell glass bottles and pretend to sell them in the VR environment. Do you know if this asset will allow my customers to buy (pay) the website’s products on the VR environment? Thanks
Hello @Zyonia , thank you for posting here. If you are running your e-commerce website in a VR browser already, you would actually not need any Unity asset like this one, or Unity at all. You could just create a PayPal link to your product and embed that on your website, which would then open a new page and direct the user to PayPal. The behavior would not differ between desktop and VR.
If you have developed a Unity application which renders your website in-app, or built a completely new application (without any browser), it gets a bit more difficult. To lay down the facts, App Stores do not allow selling physical goods with their native payment systems. So, using e.g. Google Play (+Pay) or the Apple App Store for that is not allowed. You definitely have to use PayPal (supported by this asset) or any other external payment provider yourself.
Currently, when using PayPal with this asset, a new page is opened directing the user to PayPal as explained above. Actually I have not tested this workflow and what happens in VR, since it has not been asked before. If you are considering buying this asset, could you elaborate more on the desired behavior: Unity application + browser (external browser asset?), Unity application and in-game shop (without browser), and what VR environment (device?). Thanks!
Does this work with PC games? More specifically, a web game?
The asset itself, yes. It depends on what store or billing provider you want to use.
- PC: Steam, Oculus, PayPal (with or without PlayFab for user inventory)
- Web: PayPal (with or without PlayFab for user inventory but highly recommended)
The note on “with or without PlayFab” means that if you decide to use PayPal, you have to decide where to store the player’s purchases, as PayPal is only a billing provider, not a user cloud storage. The integration with PlayFab would handle that and avoids you having to set up a database and player authentification on your own.
When I click on a button, it says “Billing is not available” or “Not enough currency”
Is there a step by step guide that I may follow?
The online documentation is referenced on the first post in this thread, in the Readme PDF shipped with the package, on the Asset Store page, and in the asset’s “About” window in the Project Settings - it’s actually really hard to miss :). You can find a Getting Started guide as well as store specific guides there.
https://flobuk.gitlab.io/assets/docs/sis/getting-started
https://flobuk.gitlab.io/assets/docs/sis/stores/
For some reason Unity analytics doesn’t report any of the revenue when people buy things. Not sure if it’s an issue with Steam/PlayFab. But just thought I’d check to see if that’s a known issue.
@Benajben Since Steam is a custom store that does not ship with Unity IAP, Unity IAP cannot report revenue to Unity Analytics. Doing this manually would result in client ownership of reported revenue, so your best alternative is to look into the analytics on PlayFab instead.
@Baroni1 Good to know! I wish the PlayFab analytic tools were as good as Unity’s haha!
@Baroni1
Hi there! New Unity IAP [was released]( Unity IAP package 4.12.2 is now available page-2).
Many callbacks have been added. Are you thinking about implementing them?
Hi @justtime ! The Unity IAP changelog is longer than the actual required or noteworthy changes though. Specifically, there are no “new” callbacks - the old ones have been extended with an error message. I did implement them already (I have to, otherwise the interface throws errors) and will release the update early next week.
Hey, I just got the package and I’m trying to implement purchases for Steam.
Followed the steps in the guide. Used the example json file so the default products would work.
Built the project with only “01 Buttons” scene, saved the project into the correct folder inside steamapp, when I launch the game I see the overlay, but when I press the buy button nothing happens.
Checking the log, it seems to be breaking at “SteamStore.Purchase” any idea of what might be happening?
This is an existing steam project with live builds, dunno if this changes anything…
This is the error I get:
NullReferenceException: Object reference not set to an instance of an object.
at SIS.SteamStore.Purchase (UnityEngine.Purchasing.ProductDefinition product, System.String developerPayload) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.Purchasing.PurchasingManager.InitiatePurchase (UnityEngine.Purchasing.Product product) [0x00000] in <00000000000000000000000000000000>:0
at SIS.IAPManager.Purchase (System.String productID) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.Events.InvokableCall`1[T1].Invoke (T1 args0) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.Events.CachedInvokableCall`1[T].Invoke (System.Object[ ] args) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.Events.UnityEvent.Invoke () [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.EventSystems.StandaloneInputModule.ReleaseMouse (UnityEngine.EventSystems.PointerEventData pointerEvent, UnityEngine.GameObject currentOverGo) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.EventSystems.StandaloneInputModule.ProcessMousePress (UnityEngine.EventSystems.PointerInputModule+MouseButtonEventData data) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.EventSystems.StandaloneInputModule.ProcessMouseEvent (System.Int32 id) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.EventSystems.StandaloneInputModule.Process () [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.EventSystems.EventSystem.Update () [0x00000] in <00000000000000000000000000000000>:0
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction`1)
UnityEngine.EventSystems.StandaloneInputModule:ReleaseMouse(PointerEventData, GameObject)
UnityEngine.EventSystems.StandaloneInputModule:ProcessMousePress(MouseButtonEventData)
UnityEngine.EventSystems.StandaloneInputModule:ProcessMouseEvent(Int32)
UnityEngine.EventSystems.StandaloneInputModule:Process()
UnityEngine.EventSystems.EventSystem:Update()
Edit 1:
After adding a lot of logs in the Purchase method, I can see the reason why: “steamStartPurchaseResult” is null is there anything I can do to fix it?
Edit 2:
Adding a null-propagating operator to the “Unregister” method call fixed it. Is this needed for some reason? Since I skipped the method.
Thanks for the report @mbast , and glad that you fixed it already. The “steamStartPurchaseResult” callback was introduced in the last update and is actually just there for debugging purposes, so not required for the purchase process on Steam. I’ll add a fix to the next update as well, thanks again.
No problem, as I understand you can just keep it and just call the “Unregister” method the second time around, the problem was that the method was being called before the variable was initialized. The null-propagating operator did the trick for me, but might not be the most elegant solution.
I just have one quick question, I already have unity purchasing implemented for mac/ios/android will there be a problem if I use your library for steam only, is there something that might cause a conflict with both implementations? I really don’t want to rewrite the whole purchasing logic on mobile to use your library instead.
It depends a bit how you implemented it in your project: if you have separate scenes or projects for each platform, you would simply not add the IAPManager prefab to your (e.g. shop) scene. If you use the same scenes for all platforms and the IAPManager is in all of them, you might want to deactivate its use of Unity IAP by going to Project Settings > Player and removing the “SIS_IAP” define for a specific platform (e.g. Android or iOS).
Since Steam can run on Mac too and is included in the Standalone platform, you could want to add a custom check and disable “Auto Initialize” on the IAPManager there. Otherwise, when the IAPManager is not initialized, Simple IAP System will do nothing.
Hmm, the remove “SIS_IAP” might do the trick, didn’t think about that. Thank you
Although, I just tried to build with both enabled and it works as expected on android. But better be safe and remove the “SIS_IAP” definition anyway.
Hey, I am getting the following error on a testflight build;
IAPManager: Trying to purchase product for real money with Unity IAP disabled. Nothing will happen.
any idea what could be the reason for this ?
Edit: It seems “SIS_IAP” is not available, not sure what i need to do to add it back
Hi there, open the Project Settings > Simple IAP System and enable the Unity IAP checkbox.
Thanks!