Samples
Be sure to check out the Getting Started Guide first, as well as the guide A Simple Example which creates a full experiment on PlayUR with two groups to vary a single Parameter for the bounciess of a ball.
This is a list of all the samples provided on by the PlayUR Package, with a basic description of the topic. You can access the code for these samples via the Package Manager inside Unity, or just browse the code on GitHub.
These samples all assume you have a game set up on the PlayUR Dashboard and know how to set up Experiments, Groups, Parameters, and Elements.
- Reading Game Parameters
- In this sample, a number of blue spheres are spawned, the number being set by a parameter. String parameter values are shown in a text box, and a random piece of text selected from a string parameter list when you click a button.
- Reading Game Elements
- In this sample, a blue sphere is always shown, however the two red spheres are only shown if a specific Game Element is enabled for this experiment.
- Reading Experiments and Groups
- In this sample, the current experiment name and group is shown.
- Reading User and Build Info
- In this sample, the username and build info is shown. If the currently logged in user is an "owner" of the game, a special admin-only blue sphere appears.
- Recording Analytics
- In this sample, a blue sphere will bound back and forth, and on every collision record a new analytics action. A sample of sending multiple actions from code in quick succession (stress-test) is also shown.
- Saved Games
- This sample allows you to save some text entered in a text box. On load, the text box will contain the last saved message in the box. PlayUR overrides PlayerPrefs to accomplish this.
- Surveys
- Sample to show how to popup a survey. Data is set in a scriptable object in the sample. PlayUR also has a standard game experience survey, shown here.
- It is recommended to use a more establshed external tool for this such as Google Forms or Qualtrics.
- Popups
- Sample that shows how to open up a popup in the bottom corner with custom text and an image. Useful for notifications, and custom achievement systems.
- Highscores
- Show and record highscores across players. Illustrates a few different variations on the code.
- This feature is only very basic
Unity samples not yet written:
- Session Management
- Amazon Mechanical Turk Integration
- JSON Parameters and Parameter Metadata