This project is the open source WebGL SDK for Unity, a wrapper to the Agora Web SDK 4.x.
Please be aware that this is still a beta release. Do not assume everything works correctly as an official product. Do not expect the same behaviors from the original Unity SDK. You should check the README files to understand this SDK some more before proceeding to download. Do press the Star to show respect to people who work hard on creation of this SDK on your demand.
- Unity 2017 and up
- Agora Developer Account
- Knowledge of how to deploy and debug WebGL Application from Unity
- Google Chrome
This section shows you how to prepare, build, and run the sample application.
Before you can build and run any Agora project, you will need to add your AppID to the configuration. Go to your developer account’s project console, create a new AppId or copy the AppId from an existing project.
Note it is important that for a production ready project, you should always use an AppId with token enabled. However, in testing a demo, you will skip this part. Using a testing mode AppId can save time for POC integration.
- It is optional to clone this repository, to obtain the unity package file, go to the release section and download the latest version.
- [Optional] Download and import the Agora Video SDK
- Import the WebGL SDK package (Unity Editor-> Assets -> Import Package -> Custom Package). Overwrite all the files if Step 2 was performed.
- From Project window, open Asset/AgoraEngine/Demo/Main.scene
- Next, go into your Hierarchy window and select GameController, in the Inspector add your App ID to to the AppID Input field.
This repository includes a subset of API-Examples that resembles the main SDK's version. Please use the Canvas game object to fill the AppID instead of GameController.
You must download the Agora Video SDK in Step 2 above.
- Go to File > Builds > Platform and switch to platform WebGL
- Make sure AgoraTemplate or AgoraTemplate2020 is chosen under "Resolution and Presentation": The difference of the templates: use AgoraTemplate2020 for Unity Editor 2020 and up.
- You may do Build And Run for Unity version 2020 and up. For Unity 2017, you need to build first, then run it from your local http server.
Web Published README
Programming Guide
Build and Run
The MIT License (MIT). See doc.