![unity web player new version unity web player new version](https://s2.glbimg.com/o7un_xmo1uonanDHyQeZrEPB9nY=/0x600/s.glbimg.com/po/tt2/f/original/2013/12/09/unity4.jpg)
The latest channel is named Release while the previous one is named Stable.
#Unity web player new version update#
When an update to the runtime is released, the plugin automatically retrieves it but also retains a copy of the previous version. To avoid problems like this, the plugin is designed to keep a number of different versions of the Unity runtime, which are called Release Channels. Since the plugin updates automatically, such bugs could leave a user unable to play a web game until they are fixed and in the meantime, there may be no way to get the working version of the runtime back.
#Unity web player new version upgrade#
The plugin checks for new releases as it starts up and will automatically upgrade itself when necessary.Īlthough Unity does take backward compatibility very seriously, it is still possible that a new release could introduce bugs that cause problems with existing webplayers. Both the name and the function are required so that it can receive the SendMessage function from the browser as mentioned previously here.Whenever a new major version of Unity is released, the webplayer plugin for the browser is also updated to take advantage of the latest features. It is important to note that this script is added to an object called WebAvatarLoader and it has a function called OnWebViewAvatarGenerated.
![unity web player new version unity web player new version](https://appfresh.co/wp-content/uploads/2019/01/Unity-Web-Player-screenshot.png)
The WebAvatarLoader.cs is a simple class based on the RuntimeTest.cs example, it handles the loading of the avatar loading and setup of the Ready Player Me iFrame. Once declared this way they can be called like regular C# functions (on WebGL builds). Private static extern void HideReadyPlayerMeFrame() Private static extern void ShowReadyPlayerMeFrame() Private static extern void SetupRpm( string partner) To communicate from Unity to the iFrame running Ready Player me we created a Javascript Library called WebHelper.jslib as shown below it has 3 functions. the data we wish to pass, which is a URL in this case.the name of the function we want to run (OnWebViewAvatarGenerated).the name of the target object in the Unity scene that has the script and function we want to run (ReadyPlayerMeAvatar in this case).Then we use the reference to the UnityInstance called unityGame and run the SendMessage function. eventName = "v1.avatar.exported" ) Īs you can see we first check this eventName as we specifically want to handle it every time we get the vr.avatar.exported event (after an avatar has been created).
![unity web player new version unity web player new version](https://3.bp.blogspot.com/-0QXRvLt4N3c/T6vQzeryIlI/AAAAAAAAB88/pbI0SSt_BfI/s1600/Screen+shot+2012-05-10+at+15.00.03.png)
To simplify things we will be looking at the RPM_Template as it is more relevant however the logic is very similar for the RPM_2019 template.Īs with all WebGL templates, there is an index.html which is based on the Default template that unity provides but with some extra wrappers ( canvas-wrap) and an that will hold our Ready Player me iFrame as you can see below. It will take some time to compile but once it is finished it should open up the WebGL application in your default browser. Once that is done you can open up the Build Settings window again, make sure you have selected WebGL as the target platform then click Build And Run. From there select Player from the menu on the left side and open the Resolution and Presentation section.įrom here select the RPMTemplate (or RPM_2019 if using Unity version 2019). Make sure the example scene Scenes/WebGLExample is added at the top of the Scenes In Build section. Open the example project in Unity (version 2019 or higher) and open up the build settings window. This is template was created to support Unity version 2020 or higher, making use of the latest features of Unity's WebGL packaging system. TemplatesĪs the name suggests this template is specifically designed to work for Unity 2019 versions as the WebGL API changed in Unity 2020+. This project can be used as a reference for anybody wanting to add Ready Player Me Avatars into their Unity WebGL application. This repository contains a Unity project that uses a custom WebGL template to embed the Ready Player Me character creator inside an application to seamlessly add avatars. Ready Player Me Unity WebGL Integration Example