Skip to main content

VR sample scene setup

This page explains how to set up the VR sample scene shipped with Simple IAP System, so you can use it for testing IAPs in VR before integrating it in your own shop scene.


For XR input, import the XR Interaction Toolkit into your project via the Package Manager, including the Starter Assets sample files.


If you are not using the new Input System yet, upon import this package will ask you to switch to it and restart Unity. Confirm that and in the Player Settings for your build platform, ensure that Input System Package (New) or Both is selected.


Map XR Input

Add the default controller inputs included in XR Interaction Toolkit to your Preset Manager as shown below (left & right, one by one).



Import VR sample scene

Import Simple IAP System's VR sample scene by opening Project Settings > Simple IAP System and clicking on the Virtual Reality button.


Open the scene, which can now be found in your project under SimpleIAPSystem > Extensions > VR > Scenes. Check that on its XROrigin game object, XR Interaction Toolkit's default input actions are assigned.



Finally on the Build Settings, drag in the newly imported VR scene, disable the non-VR related scenes as seen in the following screenshot, and make sure that the VR scene is the first scene to load.


Deploy the scene to your target platform and run it on your device!



Note that without making use of a VR store integration for billing, trying to buy a product will show the message Billing is not available. Please enable VR billing e.g. Oculus by following the corresponding guide.