Questions tagged [unity-webgl]

Unity WebGL is a build option for exporting Unity projects as JavaScript programs which use HTML5, WebAssembly, WebGL and other web standards to run Unity content in a web browser.

What is Unity WebGL?

The WebGL build option allows Unity to publish content as JavaScript programs which use HTML5/JavaScript, WebAssembly, WebGL rendering API and other web standards to run Unity content in a web browser.

As of Unity 5.4, Unity WebGL is the official replacement for the Unity Web Player.

580 questions
25
votes
4 answers

How do I run a local Unity WebGL (file:// url) build?

Multiple browsers (Chrome, Firefox, Internet Explorer) give the following error when trying to open a local Unity WebGL build: It seems your browser does not support running Unity WebGL content from file:// urls. Please upload it to an http server,…
k-venkatesan
  • 655
  • 1
  • 8
  • 15
20
votes
3 answers

How can I place Unity WebGL in my React Native app?

I have written a simple React Native app using WebGL. I used https://github.com/JilvanPinheiro/reactive-native-unity-webgl import Unity from 'react-native-unity-webgl'; ... render() { return (
11
votes
2 answers

Unity/WebGL and asm.js related crash in MS Edge

I have a very basic Unity app that's essentially a test harness for a proprietary framework. It runs fine in Chrome, Firefox and Safari. Edge is a different story. In Edge 12, with asm.js disabled, it takes a very long time to load - roughly 90…
Daniel Schaffer
  • 56,753
  • 31
  • 116
  • 165
10
votes
2 answers

EditorUtility.OpenFilePanel for Unity WebGL (Runtime)

I want the user to select a image from computer in Unity WebGL game but I am not able to get any library or code for this thing. I want exact functionality of EditorUtility.OpenFilePanel for UnityWebGL (Runtime). string path =…
Muhammad Faizan
  • 863
  • 1
  • 7
  • 16
8
votes
4 answers

Unity WebGL get stuck on loading page with localhost server(no errors)

When I try to run my Unity project with WebGL building on localserver IIS or Tomcat, it gets stuck like this: (the loading page is open successfully, but progress bar does not move) I have already added the config file for IIS, and there is no…
Azphire
  • 93
  • 1
  • 1
  • 7
8
votes
4 answers

Importing a Unity WebGL-project into an Angular2 component

I'm looking to integrate a Unity WebGL-project into an Angular2 app. What's the proper way to move all this script into an Angular2 component? First, the Unity WebGL exports an index.html like this: …
7
votes
2 answers

Unity WebGL asset bundle memory is not releasing

I am loading and Caching Asset Bundles using below function in unity webgl: IEnumerator DownloadAndCacheAB(string assetName) { // Wait for the Caching system to be ready while (!Caching.ready) yield return null; …
7
votes
2 answers

Access C# List from JavaScript

As part of our internship we've been tasked with creating a business application using Unity WebGL. After reading on interactions between JS and the C# code we're in a corner. We're trying to get back a list from C# to populate a Select on our…
Dauwbot
  • 81
  • 6
6
votes
1 answer

Wasm code generation disallowed by embedder in Chrome

I am embedding a WebGL game built in Unity on my web app built in Flask. I use a CSP for security purposes on the backend but even after including the wasm-eval directive in my CSP, I continue to get these errors only in Chrome: UnityLoader.js:4…
nosh
  • 620
  • 3
  • 14
  • 50
6
votes
1 answer

Webgl unity build won't play Video

I have used video player to play video, everything works fine in unity but when I build it and run on firefox or any other browser,the video won't play. I have tried different settings and different video formats but nothing seems to work. I don't…
Jz Konain
  • 219
  • 1
  • 2
  • 8
6
votes
1 answer

Hosting Unity WebGL Game using Laravel Framework

How do I put my Unity game built in WebGL into Laravel? FYI, Unity WebGL, when built gives me these files: - Build (folder) - TemplateData (folder) - index.html Let me tell what I have done: [ How I test if the game works in WebGL using XAMPP ] I…
Nasrul Arif
  • 165
  • 1
  • 12
6
votes
3 answers

Generic/Unknown HTTP Error with response code 0 using UnityWebRequest

I was trying to use some server's API functions, and suddenly came to this error. I will explain it after the code sample: public IEnumerator Post(Dictionary data) { var request = UnityWebRequest.Post(Url, data); …
Pavel Kotov
  • 103
  • 1
  • 1
  • 7
6
votes
1 answer

FileReader API 'load' event

I am currently working on a Unity Webgl project and I am new to javascript and web . In my project the user have to be able to add pictures and videos to the the webgl player, picture works fine (thanks to gman's code on this thread). I use it as a…
6
votes
2 answers

Unity3d WEB GL build with photon network

I has been developed multiplayer unity3d shooter with photon network(PUN). It builded fine and running for windows(exe), but it does not work in browser(web gl). Test project without photon works fine in browser. I think the problem linked with…
user1941407
  • 2,722
  • 4
  • 27
  • 39
5
votes
2 answers

React unity WebGL not working on React JS project

Hey there trying to make my Unity WebGL export work on my React JS project but for some reason is not working I'm using the following React Unity WebGL version (react-unity-webgl@7.x # For Unity 2018 and 2019 (Active LTS)) and I have followed the…
ReactPotato
  • 1,262
  • 3
  • 26
  • 46
1
2 3
38 39