中文 | English
This project is the open source WebGL SDK for Unity, a wrapper to the Agora Web SDK 4.x.
- This is a community supported SDK in open beta. Do not assume everything works correctly as an official product. Do not expect the same behaviors from the original Unity SDK. The Agora Support team does not assume responsibility in solving your issues.
- This project is NOT compatible with the current official Agora Unity SDK ver. 4.x
- If your just want to get the SDK, do not clone this project unless you plan to contribute code. Instead, go to the Release section download the package.
- Check the Wiki page to understand this SDK some more before proceeding to download or asking questions.
- Spatial Audio may not work.
- If it is not a bug or improvement request, your question probably should be asked in the Discussions page instead.
- Do press the Star to show respect to people who work hard on creation of this SDK on your demand.**
- Unity 2019 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.
- Import the WebGL SDK package (Unity Editor-> Assets -> Import Package -> Custom Package).
- 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 set of API-Examples that shows how to use a particular feature. Starting from Refactor 8 release, these demo scene are grouped into the Home Scene for build. Use the AppIDInfo asset to input the AppID (and token if using certificate enabled AppIDs)
You must download the "Complete" package from the Release. The package includes native plugins (Windows/MacOS) that support the Editor environment. Some may confuse on why certain functionalities work differently on Web verses "Editor". That is because the platform differences between the WebGL and the native.
- 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 other versions, you need to build first, then run it from your local http server.
Please see the Wiki page for more information.
The MIT License (MIT). See doc.