Getting Started
Create a PlayUR Game
- Visit the Manage Experiments page and click on
Add Game
. - Fill in the details and submit.
- Take note of the generated
Game ID
andClient Secret
as you will need these when configuring the PlayUR Plugin in Unity. - Ensure at least one Experiment and Experiment Group is configured on PlayUR. See Creating a PlayUR Experiment for information.
Installing the PlayUR Package
- In your Unity project, open the
Package Manager
. - Click on the
+
button and chooseAdd Package from Git URL
. - Enter https://github.com/lfwells/playur-unity-plugin.git
Configure the PlayUR Plugin
- In Unity, choose the
PlayUR -> Plugin Configuration...
. - In the PlayUR Settings, enter the
Game ID
andClient Secret
from the previous steps. - For the other
Setup Checks
items, clickFix
.
Working With Source Control
- The file
Assets/PlayURPlugin/Resources/PlayURClientSecret.asset
should not be committed to source control as it contains the client secret used to talk to the PlayUR servers. - The
Element
,Parameter
,Experiment
,ExperimentGroup
,Action
, andAnalyticsColumn
enums are generated based upon your game ID. Due to a limitation of generated files from Unity packages, these files are modified in theLibrary/PackageCache/io.playur.unity@####
folder. You do not need to commit these files to source control, however all collaborators will need to generate these enums themselves upon first opening the project via thePlayUR -> Generate Enums
option.
Next Steps
The plugin should now be ready to use! If you have already configured Experiments, Elements, and Parameters, these will already appear in Unity in the Debug Configuration
section of the PlayUR Settings.
From here, the following resources should be useful:
- Unity Plugin, particularly how to extend the
PlayURBehaviour
class. - Guides and Samples