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
0
votes
0 answers

Crash on Chrome when writing file on Webgl

In Unity3d Webgl I download and write big file (about 100 mb and more) to cache (indexeddb). I downloaded file with UnityWebRequest and write file in downloadHandler. Sometimes after call filestream.Write() or filestream.Flush() Chrome will…
Knaus Irina
  • 789
  • 5
  • 15
  • 35
0
votes
1 answer

Unable to type in input with Unity WebGL background div in React JS

import React from 'react'; import ReactDOM from 'react-dom'; import {Unity} from 'react-unity-webgl'; var timerCount = 0; export default class App extends React.Component { constructor(props) { super(props); this.state = { nPageNum:…
Hans Chan
  • 41
  • 5
0
votes
1 answer

React.JS onChange event not working with using unity-webgl

import {Unity} from 'react-unity-webgl'; ... handleChange(event) { console.log(event.target.value); } render() {
...
...
Hans Chan
  • 41
  • 5
0
votes
1 answer

How to fix stuck Unity "converting managed assemblies to c++"?

In Unity 5.5.4 (on Windows 10 x64) when going to File -> build settings, chose WEBGL, clicked build, the loading stuck at "converting managed assemblies to c++". Anyone knows the fix?
wast
  • 878
  • 9
  • 27
0
votes
1 answer

Shader Syntax error - Unity WebGL

I am trying to build a Polygon Tool WebGL project. The project works fine in the Editor, but the shader gives a syntax error when building, namely: Shader error in 'Unlit/polygon': 'Value' : syntax error syntax error at line 28 (on gles) Compiling…
0
votes
0 answers

Unity - Does OnMouseDown() work in tandem with WebGL and mobile?

So I know that WebGL on mobile isn't fully supported, but I've gotten the game itself to run just fine. It just isn't registering touches. I have read that OnMouseDown will work on iOS anyway, and if it doesn't, there is a script that Unity supplies…
Mike OD
  • 117
  • 1
  • 12
0
votes
1 answer

WebGL and UNet. Cant seem to get in proper contact with server from a browser

I am trying to setup a multiplayer game to be played through a browser using UNet. In the editor everything works fine, I followed a tutorial (https://www.youtube.com/watch?v=qGkkaNkq8co) that said it should work in webgl but sadly it does not.…
0
votes
1 answer

Unity WebGL Build

I am trying to release a WebGl build and keep getting the following error messages no matter what I try on the forums. My build runs fine on any other platform First error: Failed running C:\Program …
James M
  • 1
  • 2
0
votes
1 answer

Using Fb Web Access token with Unity FB sdk in WebGL

As I'm unable to log to Fb without sending a popup that's always blocked by browsers. In order to get around this problem, I'm trying to include the FB log button directly into the webcanvas. Once it's logged i can sent back to unity the user acces…
Eidern
  • 68
  • 10
0
votes
0 answers

Can I reference a script attached to a prefab that's loaded from an AssetBundle in Unity WebGL?

I have a Unity WebGL app that is using the AssetBundle Manager to load a prefab. It's successfully loading the prefab and associated animations, but I can't reference the script attached to the prefab. I'm not trying to include the script in the…
Dave Cowart
  • 781
  • 6
  • 17
0
votes
0 answers

Unity Keep GameObject size in pixels on screen by zooming camera

I have a top-down perspective camera view of an object in my scene. I'm exporting for WebGL, and I want to start off the scene with a top-down view of the object, but I need it to remain the same size in screen pixels no-matter the width/height of…
bbeckford
  • 4,467
  • 6
  • 34
  • 48
0
votes
1 answer

Unity WWW Post failure in WebGL

I have a Class that is failing when running in WebGL but it works in the UNITY IDE (5.6.1f1 Personal (Plus) Edition.) The code is 'trimmed' below, but yields the same characteristics (fails as a WebGL and runs w/ no issues in the UNITY IDE.) I'm…
RHooper
  • 1
  • 1
0
votes
3 answers

Mouse cursor is not changing on WebGL

using System.Collections; using System.Collections.Generic; using UnityEngine; public class mouseScript : MonoBehaviour { public Texture2D cursorTexture; public CursorMode cursorMode = CursorMode.Auto; public Vector2 hotSpot =…
0
votes
1 answer

SceneManager.LoadScene/LoadSceneAsync loads empty scene (WebGL) Unity 5.6

After update 5.6.1f my WebGL build can't load scene correctly. Develop build and DebugSumbols activated - same result. No errors, no warnings. Always was load empty scene, but with NotDestroyOnLoad objects after prevois scene. Same problem, but no…
Dmitrii
  • 93
  • 10
0
votes
1 answer

Unity3D AR application WebGL build reporting errors

I'm an amateur AR developer working on a project in my spare time. The ideal build for this project would be a WebGL application. However, the WebGL build that I created within Unity does not run. I have tried running the index.html on both…