Unity Services - Unity-Technologies/EndlessRunnerSampleGame GitHub Wiki
The game have multiple Unity services integration.
They are all disabled by default in the project, and all code related to services are behind multiple define in the code so the project should compile even with all services disabled.
To enable the one you want, just open the Service window (menu entry Windows > Services
) and create a new project with your Unity ID. All service will be linked to that new project.
Note that some services like Ads only work on mobile device, so to test them, don't forget to switch your project to a mobile platform, Android/iOS
Most services will work out of the box once enabled, but some will require some specific steps:
Ads
Ads use specific placementID to configure each ads depending on where in the game it is offered. The scripts AdsForMission.cs
and GameState.cs
have a public field for the placementID to use.
You can find those scripts used on the prefab Prefabs/UI/AddMissionButton
and in the scene Main, on the object UICamera/Game
in the hierarchy
So for Ads to work, you either need to:
- change the placementId of both to the default
rewardedVideo
created for you
OR
- Got to the Ads dashboard and create two new ads placement called
reviveVideo
andmissionVideo
IAP
IAP need to be manually imported in your project after being enable. Once enabled, click on "Import" and accept the popups that will appear.
If after that you have error about unfounded StandardPurchasingModule
, go to Plugins/UnityPurchasing
folder, and double click the UnityIAP
package and import the full API into the project.
For testing in the Editor : go into 'Plugins/UnityPurchasing/Resources' and look for UIFakeStoreCanvas prefab, and change the Canvas sort order to 100. That will make it appear on top of all canvas in the game, useful to test IAP in editor.