Unity Integration
A step by step guide to integrate the Player Zero SDK into your game
Last updated
A step by step guide to integrate the Player Zero SDK into your game
Last updated
Note: these docs are still early access and partially incomplete
NOTE: Unity builds for P0 only working with stripping set to 'low' at this time. Please ensure your game builds do not have 'high' or 'medium' stripping. We are working to bring support for higher stripping levels in the future.
You should have been in contact with a member of the Player Zero team.
If you intend to use your own existing character proportions and rig with P0 visuals applied on top, then you should have sent us your base character FBX so we can setup a custom blueprint for you. Note: this is not required if you intend to use the default P0 proportions and P0 rig in your game.
You have should have received confirmation from Player Zero that your account is setup, and you should've been given your Player Zero developer account credentials.
If any of the above prerequisites are not true, please reach out to us before continuing.
You can visit our releases page to access the latest release and install it via the Unity Package Manager.
Using the credentials provided to you by your account manager, you should now login to your Player Zero developer account as shown in the screenshot below. You can access the developer login window by going to tools -> Player Zero.
Before following this document, your Player Zero account manager should've asked you for your character base model, and they should've taken it away and setup a blueprint for you account. Take some time now to verify that your blueprint appears in the window, similar to the ones shown below. It should also have already been populated with a default template prefab.
Using the test script below, you can now try to test out loading a Player Zero character. You can use any avatar ID, including ones from the playerzero.readyplayer.me platform, or from the test avatar ids we have provided to you.
Using the test script below, you can now try to test out loading a Player Zero character as a specific blueprint in your account. The returned avatar will come with the rig and proportions of whatever the target blueprint has.
Using the test script below, you can now try to test out loading a Player Zero character that has been passed to the SDK via hot loading, as a specific blueprint in your account. The returned avatar will come with the rig and proportions of whatever the target blueprint has.
In order for us to understand how Player Zero players are interacting with your game, we require you to add the PlayerZeroAnalytics component into your game. The metric captured by this component are vital to your partnership with Player Zero. To set this up, simply create a new empty component in the initial scene of your game, and then add the PlayerZeroAnalytics component.
Making sure you have set your GAME ID in tools -> Player Zero, otherwise you will see an error and player sessions will not be captured
As part of the integration of Player Zero, you may sometimes need to trigger Player Zero game events manually at certain points in your game loop. For example, if you allow your player to switch out their Player Zero avatar for one of your own. Doing this is as simple as calling the SendEvent and StartEventSession functions that is are available through the SDK.
The difference between StartEventSession and SendEvent is that the former creates a new session id when it is sent, and the latter requires a session id to be passed to it to end the session. There are multiple event types that can be sent, and you can see all of these in the Events folder in the SDK.
Check our out documentation for Deeplinking .