Zarbuz / Agora_Unity_WebGL

WebGL plugin for Unity, beta release

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Agora Unity WebGL Plugin and Demo

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.

Prerequisites

  • Unity 2017 and up
  • Agora Developer Account
  • Knowledge of how to deploy and debug WebGL Application from Unity
  • Google Chrome

Updated main Demo

Demo for WebGL

Quick Start

This section shows you how to prepare, build, and run the sample application.

Obtain an App ID

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. enter image description here

Run the Demo Application

  1. It is optional to clone this repository, to obtain the unity package file, go to the release section and download the latest version.
  2. [Optional] Download and import the Agora Video SDK
  3. Import the WebGL SDK package (Unity Editor-> Assets -> Import Package -> Custom Package). Overwrite all the files if Step 2 was performed.
  4. From Project window, open Asset/AgoraEngine/Demo/Main.scene
  5. Next, go into your Hierarchy window and select GameController, in the Inspector add your App ID to to the AppID Input field.

API-Examples

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.

[optional] Test in Editor

You must download the Agora Video SDK in Step 2 above.

Build and Run

  1. Go to File > Builds > Platform and switch to platform WebGL
  2. Make sure AgoraTemplate or AgoraTemplate2020 is chosen under "Resolution and Presentation": webgl_template The difference of the templates: use AgoraTemplate2020 for Unity Editor 2020 and up.
  3. 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.

Resources

Web Published README

https://docs.google.com/document/d/e/2PACX-1vSwUDoydPjdpCEFRS1UXZtUnKwrRifTvDxQHfyzerUNSs5U6YeWejLGys9GPQEmB6h6ax43VPFFVuG9/pub

Programming Guide

https://docs.google.com/document/d/e/2PACX-1vSuO71snguUTLG58LcVHD71LKGI5sBtZZi12qRYbey7lNQm8Z7JAv8HKcGW0Fzz8-GXEeXedl0jhE0Y/pub

Build and Run

https://docs.google.com/document/d/e/2PACX-1vSnaMq_oIhzxnoKCwEi6WKvfx7-Wy3ujg_IXOOWDp9SSWMbO7cD6nV0cR9hpH5Xmg/pub

License

The MIT License (MIT). See doc.

About

WebGL plugin for Unity, beta release

License:MIT License


Languages

Language:C# 62.8%Language:CSS 29.9%Language:JavaScript 6.6%Language:HTML 0.5%Language:Shell 0.2%