Testing Web Builds in Unity
How to test web builds locally and use the Pley Editor Companion.
Testing Locally: In Web Browser
Before uploading a build to the Pley Game Manager, you can click run the build using Pley without uploading the build. This feature simply runs the Pley Game Manager sandbox but using your local game files.
1) Click Run next to your latest build.
2) Now click Open in browser to open your build in the Game Manager Sandbox player.
3) Excellent! If all went well, you're now running your game on Pley — on the web!


Testing Locally: Unity Editor Companion
The Pley Unity SDK has a feature called the Editor Companion, which lets you run web-only functionality in the Unity Editor. In practice, it let's you verify that everything works properly in Pley's live production environment before actually uploading it to Pley
1) Open the Editor Companion. This will allow your game to establish a connection with Pley while playing it in Unity, which in turn will initialize the Pley SDK.

The Editor Companion lets you run games with Pley inside of Unity.
2) With the Editor Companion browser window still opened, enter Play Mode in Unity.

3) With the connection to Pley established via the Editor Companion, the SDK should now initialize.
This may take a few seconds.
4) Open the Unity console. If the Pley SDK has correctly initialized, the log entry pleysdk INF - Initialization successful
should appear in your console:
pleysdk INF - Initializing, SDK version: 2.0.0-750a2917, Unity version: 2022.1.1f, dev_host: "127.0.0.1:23000"
pleysdk INF - Connecting to dev host at ws://127.0.0.1:23000/play/7qq9QsqNHj...
pleysdk INF - Connected to dev host
pleysdk INF - Initialization successful
The Editor Companion will also tell you if the initialization was successful.
Updated 19 days ago