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. Once declared this way they can be called like regular C# functions (on WebGL builds). 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. It is important to note that this script is added to an object called WebAvatarLoader and it has a function called OnWebViewAvatarGenerated. 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. 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. 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. 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. When an update to the runtime is released, the plugin automatically retrieves it but also retains a copy of the previous version. The latest channel is named Release while the previous one is named Stable.
0 Comments
Leave a Reply. |