LogoLogo
WebsiteBlogForumsSign up
  • Welcome
  • How Ready Player Me works
  • FAQ
  • 👩‍💻Integration Guides
    • Overview
    • Unity
      • Quickstart
      • Avatar Creator Integration
        • WebView Avatar Creator
          • Avatar Creator for Android & iOS
          • Avatar Creator for WebGL
        • Build your own Avatar Creator
          • Start with the sample
          • Elements
            • Asset Selection Element
            • Color Selection Element
            • Template Selection Element
            • Body Shapes Selection Element
            • Gender Selection Element
            • Avatar List Element
            • Photo Capture Element
            • Signup Element
            • Login Element
            • Logout Element
          • User Management
      • Load 2D Renders
      • Avatar Loader Window
      • Setup Multiplayer
      • Setup for XR (Beta)
        • Setup the Player Avatar
        • Setup Meta Movement SDK
        • Setup Final IK
        • Setup XR Hands
          • RpmHandDriver script
        • Facial Animations
        • VR Avatar Creator
      • Animations
        • Ready Player Me Animation Library
        • Mixamo Animations
      • Optimize
        • Avatar Configuration
        • Avatar Caching
        • Defer Agents
      • Code Samples
        • Loading 3D Avatars
        • Loading 2D Avatars
        • Avatar Creator (WebGL)
        • Avatar Creator (Desktop)
        • Avatar Creator (Mobile)
        • Distance-based LODs
      • Troubleshooting
        • Editor UI Window Issues
        • Avatar loading issues
        • iOS issues
        • WebGL issues
        • Firewall issues
        • Updating the SDK
          • Unity SDK 3.0.0 Migration guide
          • Unity SDK 4.0.0 Migration guide
          • Unity SDK 5.0.0
          • Unity SDK 7.0.0
          • WebView 2.0 Migration
        • Package installation issues
      • Help us improve the Unity SDK
      • FAQ for Unity
      • Early Access Features
    • Unreal Engine
      • Quickstart
        • Import SDK Manually
      • Avatar Creator Integration
        • Build your own Avatar Creator
          • Sample Structure
          • Customization Guide
        • WebView Avatar Creator
      • Load Avatars
      • Animations
        • Ready Player Me Animation Library
        • Loading Mixamo animations
        • Mannequin animation retargeting
        • Blender FBX export to UE
        • Oculus Lipsync integration
      • Optimize
        • Avatar configuration
        • Avatar caching
        • Avatar preloading
      • Code Samples
        • Unreal Engine 5 samples
        • Lyra project integration example
        • VR Avatars
        • Unreal Engine 4
      • Troubleshooting
        • Project compilation issues
        • Missing materials on built applications
        • Avatar loading issues
        • Animation issues
        • Unreal SDK breaking changes
        • Avatar lighting issues
        • Updating from earlier versions
          • Unreal SDK 3.0.0 Migration guide
        • Auto LOD issues
      • Help us improve the Unreal Engine SDK
      • FAQ for Unreal Engine
      • Early Access Features
    • React
      • Quickstart
    • React Native
    • iOS Native
    • Android Native
    • Web Integration
      • Quickstart
      • User Management
        • Guest Accounts
        • Account Linking
      • Avatar Creator integration
      • Optimize
    • API Integration
      • Quickstart
      • Custom Avatar Creator
      • User management
        • Ready Player Me Account
        • Anonymous Accounts
    • UX/UI Guidelines
      • Summary & quick tips
      • UX and UI guidelines and essentials
        • Foundation for good user experience
          • Layout
          • Colors
          • Typography
          • Icons
          • Dark mode and light mode
        • Mobile best practices
          • Layout
        • Making Ready Player Me feel native
          • Seamless Avatar Integration
          • Consistent Branding
          • Responsive Layout
          • Performance Optimization
        • Discoverability of the avatar editor
          • Onboarding tutorial
          • Clear navigation
          • Contextual Placement
  • 🖌️Customizing Guides
    • Studio (Developer Dashboard)
    • Avatar Creator Appearance
      • Avatar URLs
      • Avatar Shortcodes
    • Upload and Manage Custom Assets
      • Asset Manager in Studio
      • Configure in Studio
      • Manage custom assets using the API
      • Unlocking assets through API (Beta)
    • Create Custom Assets
      • Fullbody Outfits
        • Checking Skin Weights
      • Tops, Bottoms, Shoes
        • Editing templates
      • Hairstyle
      • Headwear
      • Facewear
      • Glasses
      • Hero Characters
      • Modeling Guidelines
  • 🔃API Reference
    • REST API
      • Authentication
      • Avatars
        • GET - 3D avatar
        • GET - 2D Render of an Avatar
        • GET - Metadata
        • PUT - Equip an asset
        • PUT - Unequip an asset
      • Assets
        • Asset Entity Properties
        • POST - Create Asset
        • GET - List Assets
        • PATCH - Update Asset
        • POST - Upload Asset Files
        • POST - Add Asset to Application
        • DELETE - Remove Asset from Application
        • PUT - Unlock asset for a user
        • PUT - Lock asset for a user
      • Users
        • POST - Create User
      • Auth
        • GET - Token
      • Changelog
    • Avatars
      • Full-body avatars
      • Full-body XR avatars
      • Half-body avatars
      • Morph targets
        • Apple ARKit
        • Oculus OVR LipSync
    • Avatar Creator
  • 🔉Support
    • Forums
    • Licensing & Privacy
Powered by GitBook
On this page
  • Setup the Player Character
  • Add Photon Support
  • Add Unity Netcode Support

Was this helpful?

  1. Integration Guides
  2. Unity

Setup Multiplayer

PreviousAvatar Loader WindowNextSetup for XR (Beta)

Last updated 1 year ago

Was this helpful?

Ready Player Me is designed for your multiplayer games. Learn how to set up Ready Player Me for Photon or Unity Netcode.

Setup the Player Character

The player avatar can have multiple components for custom functionality. For a multiplayer game or app, you don't want to instantiate the game object, and/or all components every time the player loads or changes its appearance.

Use the template avatar as your default character

After installing the Ready Player Me Unity SDK Core, you find a template avatar with all possible mesh combinations in the Resources folder. Use it to set up your player avatar and attach all functionality to it. Both template avatar prefabs will have a NetworkPlayer script attached to them which handles loading the avatars.

Load the User's Avatar and exchange the mesh

After loading the User-Avatar, you'll be returned a GameObject from the AvatarManager. Do not use this game object, instead do a mesh transfer and destroy the game object. You can use the AvatarMeshHelper.TransferMesh(...) from the SDK. Check out how it's done in the packages for both, Photon and Unity Netcode below.

Add Photon Support

When working with Photon PUN, you can instantiate your modified version of RPM_Photon_Character prefab in overridden OnJoinedRoom method of your class that inherits MonoBehaviourPunCallbacks. Once the prefab is instantiated, you can get the NetworkPlayer component of this GameObject and call its LoadAvatar method with the URL of the avatar you want to load. This will load the avatar in all the clients using a photon RPC method and synchronize the characters.

You can check the Avatar Control sample from the package to see the working example.

Add Unity Netcode Support

When working with Unity Netcode for GameObjects, you can set this prefab as the Network prefab of your Netcode project and when a user or host joins set NetworkPlayer scripts static InputUrl field to the URL of the avatar the user wants to use. When the game starts players will be loaded by NetworkPlayer script using their own avatars.

You can check the Avatar Control sample from the package to see the working example.

Photon requires characters to be preconfigured prefabs to be instantiated when a player joins a room, and RPM avatars are used by loading them at runtime. helps solve this problem by providing an avatar prefab and a component that handles avatar loading by transferring the avatar mesh and material to a character prefab.

Learn more about the Requirements and installation on GitHub:

supports loading Ready Player Avatars in a multiplayer application using . This can be used as a reference for anyone wanting to use Ready Player Me Unity SDK to create a multiplayer using Unity Netcode.

Learn more about the Requirements and installation on GitHub:

👩‍💻
This package
https://github.com/readyplayerme/rpm-unity-sdk-photon-support
This package
Netcode
https://github.com/readyplayerme/rpm-unity-sdk-netcode-support
Ready Player Me avatar template with multi-mesh support.