Code Monkey home page Code Monkey logo

rpm-unity-netcode-support's Introduction

Ready Player Me Unity SDK - Netcode Support

Unity Netcode for GameObjects support for Ready Player Me avatars.

Netcode requires characters to be ready prefabs to be instantiated when a player joins a room, and RPM avatars are used by loading them in runtime. This package helps solve this problem by providing a RPM avatar prefab and a component that handles avatar loading and mesh and material transfer to the character prefab.

This package provides a RPM_Character prefab to be instantiated, a NetworkPlayer component to handle the avatar loading and Avatar Control sample scene to test the avatar in a multiplayer environment.

Requirements

  • Unity 2020.3 or later
  • Ready Player Me Unity SDK

Installation

  • Copy git URL by clicking on green CODE button and then by clicking on copy button as shown.

    image
  • Open Windox > Package Manager menu, click on Plus (+) button and select Add package from git URL.

    image
  • Paste the URL in and then click on Add button.

    image
  • After package installed you should see it under Ready Player Me block.

    image

Testing the Sample Project

  • Select Ready Player Me Photon Support in Package manager and import the Avatar Control sample.

  • Open the Avatar Control scene.

    image
  • Run the scene, paste your avatar URL and click on load button.

  • Build the scene and run it on another device to observe multiple avatars in the same scene.

    image

Custom Use

From Ready Player Me menu you can copy an instance of Ready Player Me Character Prefab into Ready Player Me/Resources/RPM_Character.prefab file and modify it for your use case.

To start with the prefab comes with NetworkPlayer, Animator, PhotonView, PhotonAnimatorView and PhotonTransformView components attached. You might further modify it, add or remove components and change the aniamtion controller you are using.

The NetworkPlayer component requires a AvatarConfig and works only with Atlased avatars. You can create a new AvatarConfig to use with your multiplayer characters and use it with your NetworkPlayer component.

Known Issues

  • Avatar Partially Loading: If you did not use a Texture Atlas size selected in yout Avatar Config, you will receive avatar in multiple meshes and you might observe only eyes of the avatar being loaded and that you are getting an IndexOutOfRangeException: Index was outside the bounds of the array. error message. Multiple mesh avatars are not yet supported in the package so please use a config with atlas size selected.
  • Shared Access Violation Error: When you test your build locally, all the game instances will try to write avatar file at the same time due to first time download and cause a file read error. Even though remote players won't experience this issue it is troubling while testing your app. You might test with same avatars and after they are cached this issue should not occur.

rpm-unity-netcode-support's People

Contributors

srcnalt avatar

Stargazers

Enrico Speranza avatar

Watchers

 avatar  avatar

Forkers

kioco

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.