Loading...
Loading...
Loading...
Loading...
Deep linking allows your application to respond to external URLs and launch directly into specific content or actions within the app. This is particularly useful for experiences like loading user-specific avatars or jumping into a custom scene from a shared link. Our SDK supports deep linking across mobile platforms (Android and iOS) as well as desktop platforms (Windows and macOS). This guide will walk you through enabling and handling deep links in your Unity project using our SDK.
When it comes to sending avatars created in our PlayerZero web platform the simplest way to send them to a mobile application is by passing data via deep linking. Unity supports deeplinking and the steps described below can also be found in the Unity documentation here.
To enable deeplinking for Android you can use an intent filter. The process is as follows:
In Unity navigate to Edit > Project Settings > Player
In the Android settings tab, expand the Publishing Settings section
In the Build section, enable Custom Main Manifest. This creates a new file called AndroidManifest.xml
in Assets/Plugins/Android
.
In the Project window, go to Assets > Plugins > Android and open the AndroidManifest.xml
file
Add the following code sample inside the Unity<activity>
element, named com.unity3d.player.UnityPlayerGameActivity
or com.unity3d.player.UnityPlayerActivity
, and save the file.
Remember to replace the number 0000
in playerzero0000
with your unique GAMEID
to ensure you are using your own unique scheme.
To enable deeplinking for iOS it is even simpler, the process is as follows.
Go to Edit > Project Settings > Player > Other Settings > Configuration.
Expand Supported URL schemes to set the following properties:
Size property to 1
.
Element 0 property to the URL scheme to use with your application. For example, use playerzero0000
to open your application when the device processes a link that starts with playerzero0000://
.
Remember to replace the number 0000
in playerzero0000
with your unique GAMEID
to ensure you are using your own unique scheme.
Ensure that you have set your GameID by logging into the Player Zero Developer Window located in the tool bar Tools > Player Zero
In your first scene add an empty GameObject and add the component DesktopDeepLinkSetup.
If you look in the components inspector the SetupOnStart
property will be enabled by default. If enabled this means that when this scene is run it will automatically create a custom Windows registry that will enable us to launch the application from a web URL.
The deeplinking setup process for MacOS is exactly the same as for iOS. In any case you can find the steps below.
Go to Edit > Project Settings > Player > Other Settings > Configuration.
Expand Supported URL schemes to set the following properties:
Size property to 1
.
Element 0 property to the URL scheme to use with your application. For example, use playerzero0000
to open your application when the device processes a link that starts with playerzero0000://
.
Remember to replace the number 0000
in playerzero0000
with your unique GAMEID
to ensure you are using your own unique scheme.
Now that we have enabled deeplinking we can make use of the PlayerZeroSdk.OnHotLoadedAvatarIdChanged
event.
Lets create a new C# script and call it DeepLinkingSample.
First we will create a load avatar function that uses our PlayerZeroSDK functions to request, download and instantiate the character model.
Now we can create a new function that uses the PlayerZeroSDK.HotLoadedAvatarId()
to get the avatarId
.
Now you can use the LoadHotLoadedAvatar()
function whenever you want to load the avatar.
Alternatively you can subscribe to the PlayerZeroSdk.OnHotLoadedAvatarIdChanged
event which is automatically triggered whenever a new avatar id has been detected.
To do this lets we can use the Awake function subscribe to the OnHotLoadedAvatarIdChanged
event and assign a new function that loads the avatar.
Don't forget to unsubscribe to the event
Below you can find the full sample script.
The steps for this process can also be found on the .
The steps for this process can also be found on the .
To enable deeplinking for desktop applications on Windows we a custom entry needs to be added to the Window registry. Without this it is not possible to trigger the application to launch from a web URL. For more information on Windows registries including how to add and remove them please refer to the .
The following guide is intended for games that are not going to be published on Steam, if your game or application is going to be published on Steam we recommend using the for app deeplinking as if offers a more robust solution, particularly in regards to deferred deeplinking as it utilizes Steams built in deeplink features.
The steps for this process can also be found on the .
A step by step guide to integrate the Player Zero SDK into your game
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.
🎥 Prefer to watch instead? This short video (under 5 minutes) walks you through the steps of integrating the Player Zero SDK into your Unity game.
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.
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 one of the test avatar IDs we’ve provided, such as: 6799e786ad3f17b0ac17f265
, 6799e89a4f6181e930480786
.
In some scenarios, you may already have a character prefab in your scene that is fully rigged and wired up with your controller logic, animations, clothing, and more. In this case, instantiating a brand new Player Zero avatar GameObject and setting everything up again at runtime can be unnecessary and complicated.
To simplify this, the SDK provides a Mesh Transfer utility class. This allows you to load a Player Zero avatar and transfer its mesh, materials, and textures onto an existing character prefab that already has the correct rig setup. The temporary avatar is cleaned up automatically after the transfer is complete.
Keeps your original prefab, controller setup, and hierarchy intact.
Supports runtime mesh customization while maintaining gameplay logic.
Works with any prefab using a compatible rig (e.g., a Player Zero blueprint rig or custom rig if prearranged with the team).
Under the hood:
A Player Zero avatar is loaded in the background.
Meshes and materials from the new avatar are transferred to your existing character.
The temporary avatar is destroyed after transfer.
Your existing character prefab must use a compatible rig and hierarchy (typically a previously registered Player Zero blueprint).
Your avatar should be loaded with a matching BlueprintId
.
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.
A step by step guide to integrate Player Zero into your game via our APIs
Note: these docs are still early access and partially incomplete
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 and/or blueprint id.
If any of the above prerequisites are not true, please reach out to us before continuing.
Using the example http call below, you cantry to test out loading a Player Zero avatar's metadata. You can use any avatar ID, including ones from the playerzero.readyplayer.me platform, or from any test avatar ids we have provided to you.
Using the modelUrl from the response in step 1, you can make a GET request to that to download the Player Zero avatar GLB. You can also optionally pass a blueprintId as a query parameter to load a version of the Player Zero avatar that matches the proportions and rig of a given blueprint.
On the Player Zero platform, avatar ids will be provided to you as a query param in the url that loads the game. In order to hot load an avatar you need to take this avatar id from the url, and pass it to the endpoint in step 1 in order to successfully hot load an avatar. An example of a game url on the Player Zero platform would be the below.
The Player Zero APIs support a range of optimization query parameters that enable you to maximize the performance of your avatars for different use-cases. Below are the available parameters that you can add to https://avatars.readyplayer.me/:avatarId.glb API calls.
As part of your partnership with Player Zero, it is crucial that you we receive accurate game events from you about how Player Zero players are using your game. For this we provide a game events endpoint which you can call to provide information about player sessions.
There are a range of events that we required you to send to this endpoint in different scenarios. These are detailed below.
You can visit our releases page to access the latest release and install it via the Unity Package Manager.
Check our out documentation for Deeplinking .
quality
String
low, medium or high - Use quality presets to combine performance related parameters.
textureSizeLimit
Int
Sets the upper limit for texture resolution in pixels of any texture in the avatar.
textureAtlas
Int
Generates a texture atlas of the desired resolution. The operation merges all meshes and splits opaque objects from transparent ones resulting in a maximum of 2 draw calls.
textureFormat
String
Reduce avatar file size by formatting all textures into the specified format. Using webp encoding can result in up to 40% reduction in avatar file size. Supported values: webp, jpeg, png
morphTargets
String
Comma-separated list of individual morph targets or morph target standard groups to include on the avatar.
textureQuality
String
Choose which texture quality preset to get on the avatar. Options are 'low', 'medium', or 'high'.
meshCompression
Boolean
Whether or not to use mesh compression.
textureChannels
String
Define which textureChannels should be included in the .glb. It can be a comma-separated combination of the following values: baseColor, normal, metallicRoughness, emissive, occlusion.
meshLOD
Int
Control the triangle count of the assets equipped on the avatar.
targetBlueprint
String
The blueprint that the avatar should confirm to. This dictates the rig and the character proportions.
removeSkin
Boolean
Whether or not we should automatically remove parts of the avatar's skin mesh that is covered by clothing.
user_game_session_started
avatar_id: String game_session_id: String game_id: String
When your game launches, or a player starts playing.
user_game_session_ended
game_session_id: String game_id: String
When a player exits your game, or your game stops for any reason.
avatar_session_started
avatar_id: String avatar_session_id: String game_session_id: String game_id: String
When a player starts using their Player Zero avatar in your game.
avatar_session_heartbeat
avatar_session_id: String game_id: String
Fire one event for every minute that a player is using their Player Zero avatar in your game.
avatar_session_ended
avatar_session_id: String game_id: String
When a player stops using their Player Zero avatar in your game, or your game stops for any reason.
You can follow these docs to create an integration with Player Zero, integrate Player Zero avatars into your games, and eventually submit your game to the Player Zero Games Catalog.
Before taking a look at any of our integration guides, please ensure you have been in contact with a member of the Player Zero team, and that we have provided you with your developer account credentials.
Note: these docs are early access and still partially incomplete