In this repository you can find PatchKit Securing The Game By License Key project. This package allows you to check the license key from the app_data.json file created by the Patchkit Launcher.
- Download patchkit-securing-by-the-license-key.unitypackage or source files(go to step 4).
- Open downloaded package choosing Assets/Import Package/Custom Package in the Unity menu.
- Confirm importing all the assets by clicking the Import button.
- Log in or if you don't have a PatchKit account yet, it is time to create it.
- To get the App Secret, you need to have an application created (how to do it?).
- If you already have one - copy the Secret from the application overview.
- Put the prefab Assets/PatchKit/Securing by the license key/Prefabs/PatchKitLicenseKey on your first scene.
- Paste copied Secret into App Secret field in the prefab parameters.
- Select the Action mode as you like.
- Now you can build your game.
- Archive your build to a .zip file.
- Upload zip file as a new version of the PatchKit application.
- Enable license keys for your application.
- Create a New Key Collection.
- That's it! You can now download and distribute the Launcher and license keys.
In this mode the Time.timeScale parameter was used. The timeScale is a scale at which time passes. When game is stated than timeScale is set to zero, the game is basically paused if all your functions are frame rate independent. When the user enters the correct key then timeScale is 1.0 and time passes as fast as realtime and game will work.
Problems This action mode does not stop the possibility of clicking on the buttons.
In this mode list of Objects is being created and when the game starts, the objects become disabled. When the user enters the correct key then objects become included.
In this mode choose the Scene from Project that will start when the user enters the correct key.
In this mode include the following callbacks: OnEntry when the game starts, OnExit when the user enters the correct key.