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
1 answer

Facebook Web Hosting not working properly

I am developing an Unity game for Facebook Canvas. I am using the Facebook Webhosting product. Everything is setup on in the app settings both in game and on the developer's app page, but when I try to load the game by using the Facebook Web Games…
0
votes
0 answers

Unity WebGl does not free webcam when stopped

Good time of day, I want to make an image using the webcam. When I take image, call method texture.Stop(); but the camera is not freed anyway (white light is on). All work right in other platforms. How to shut down a camera in WebGL? The code method…
0
votes
1 answer

unity webgl and browser javascript communication

So i have this problem with communicating between browser and unity webgl, basically what i want to do is generate objects in unity's scene with javascript code from the view the webgl is being played. In other words, view will have javascript code…
K.vai
  • 25
  • 1
  • 7
0
votes
1 answer

Photon Secure WebSocket Connection In Unity WebGL

I'm having trouble when I try to connect my local Photon Server with Unity3D WebGL Build, using secure websocket connection. I can establish the connection with websockets (not the secure one) and any other environment other than WebGL builds (Even…
Ozgur Yalcin
  • 55
  • 1
  • 3
  • 12
0
votes
1 answer

Unity: WebGL build not using custom UnityProgress.js

Original post: http://answers.unity3d.com/questions/1350392/webgl-build-not-using-custom-unityprogressjs.html I have a Unity project that I have deployed in WebGL. In the Assets/WebGLTemplates folder I have custom template data. Index.html …
sweng
  • 1
  • 1
  • 3
0
votes
1 answer

Error when calling Unity function from WebGL SendMessage

SendMessage call: gameInstance.SendMessage("MessageReceiver", "Test", "This is a message", "myname"); Error message: Failed to call function Test of class MessageReceiver Calling function Test with 1 parameter but the function requires…
SoKeT
  • 590
  • 1
  • 7
  • 16
0
votes
1 answer

How to catch "You need a browser which supports WebGL to run this content." error?

I have a WebGL browser game that does not work for users that have the "Use hardware acceleration when available" setting unchecked in Chrome, they get a message that says "You need a browser which supports WebGL to run this content, please try…
0
votes
0 answers

Error, Unknown Error while connecting database to Unity WebGL Project

I would like to ask, why I get an error in database while I build my Unity project to WebGL but no error to APK build. Here is the image on WebGL build that shown an error: And this is the image on APK build that success: And this is my C#…
0
votes
1 answer

No 'Access-Control-Allow-Origin' in webGL Unity Multiplayer

I'm using "Network Lobby" asset for unity and trying to make webGL build with using WebSockets. When I create a game or get a list of servers I get the following error: XMLHttpRequest cannot load…
0
votes
1 answer

Unity webGL - build project on MacOS failed

When I try to build unity for webGL I get an error, Exception: /Applications/Unity/Unity.app/Contents/il2cpp/build/il2cpp.exe did not run properly! I am using lastest Unity on Mac, so I guess it cannot run il2cpp.exe file, is there any way to…
barha
  • 709
  • 1
  • 7
  • 22
0
votes
3 answers

Escape input key with unity3d WEB GL build

I creating WEB GL game. Game menu is shown by the following code: Input.GetKeyUp(KeyCode.Escape) It works fine in unity and in the windows build. In the browser, escape pressing is intercepted by browser and the menu is not displayed. Is it…
user1941407
  • 2,722
  • 4
  • 27
  • 39
0
votes
1 answer

Unity3D: WebGL size - 25mb js - am I doing anything wrong?

I am testing different technologies around, choosing the next platform I'd like to create my next simple game with, now it's Unity's turn. The ability to export to WebGL is a paramount for me. I created a simple test game in Unity, exported it to…
shal
  • 2,854
  • 4
  • 20
  • 31
0
votes
0 answers

Unity webGL - startup time

I have a Unity WEBGL Project, which is about 130MB big. I think that is not that much. On my PCs and MacBooks everything runs very fine and smooth. Startup time is about 10 sec. But on some PCs it takes over 20 min to download (with 50Mbit/s), and…
johnbraum
  • 276
  • 4
  • 18
0
votes
0 answers

Unity3D WebGL App works in Safari, crashes in Chrome

I'm working on an X-ray simulator found here: http://ec2-54-218-86-147.us-west-2.compute.amazonaws.com/ I've updated Unity from 5.3 to 5.5 and, while it might not be related, has caused my application to crash when ran in Chrome. The JS console on…
0
votes
1 answer

How do I create an Event Listener for Cursor.lockstate?

I'd like to add an event listener for changes to Cursor.lockState in my unity WebGL game. If the cursor is locked, I would like to unpause the game. If I detect the cursor has been unlocked I'd then like to pause. Here is what I have so far using…
Jim
  • 761
  • 3
  • 10
  • 32