Giter VIP home page Giter VIP logo

agora_unity_webgl's Introduction

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.

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.

agora_unity_webgl's People

Contributors

chrisnyoder avatar icywind avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.