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
2 answers

UNITY - Select object with Raycast - Works on Windows, errors onWebGL (TouchScreen)

I want to select an object on the scene touching it on the screen. I have made this code and it perfectly works on Unity player or when i compile the application for Windows. When i compile for WebGL i have strange behaviours (tested on…
Nic
  • 163
  • 3
  • 19
0
votes
1 answer

How can I make PDF files in a Unity WebGL build?

I am in the process of making a Unity WebGL App and I would like the user to be able to download a status report which pulls-in info from the app. So far I have tested SharpPDF with which i am able to generate a pdf in the editor and standalone…
phil.pidis
  • 21
  • 4
0
votes
1 answer

Calling function in unity causes unity to crash

I want to call a unity webgl function from a vue website, in order to do this I have the following javascript/vue code: var data = Unity3dViewer.data(); data.gameInstance.SendMessage("BrowserCommunication",…
Thijser
  • 2,625
  • 1
  • 36
  • 71
0
votes
0 answers

Unity webgl build buffering videos

I am trying to play a large video on a unity webgl build. Im using VideoPlayer component and video source is a URL. The video plays but is very jittery and keeps getting stuck. My internet speed is decent. Is there a way to pre-buffer the video…
anivader
  • 364
  • 1
  • 4
  • 17
0
votes
1 answer

Posting a json request fails in unity webgl build (but not local)

I have the following c# post request code: public static string getJSON() var client = new RestClient(""); var request = new RestRequest(Method.POST); var httpWebRequest = (HttpWebRequest)WebRequest.Create("url") …
Thijser
  • 2,625
  • 1
  • 36
  • 71
0
votes
1 answer

Unity WebGL build Webcam texture not working

I have basic webgl app with Unity3D 2017 where im using webcam texture to display webcam feed on the screen. Here is the code im using to request webcam permission: yield return Application.RequestUserAuthorization(UserAuthorization.WebCam); if…
anivader
  • 364
  • 1
  • 4
  • 17
0
votes
0 answers

Record audio then save it in webgl

I am working on a webgl project in Unity3d where i need to record audio and then prompt the user to save the audio file in his device. I searched a lot in stack and in the internet but i couldn't find any solution? any help please ?
AyhemPro
  • 23
  • 6
0
votes
0 answers

Unity WebGL Update not called on Active and Enabled game object

Running into a weird issue on WebGL builds. The issue doesn't happen in the editor. I have multiple game objects that will stop having their update called after a few seconds loading the game. I know the objects exist since I can call…
Sam
  • 794
  • 1
  • 7
  • 26
0
votes
1 answer

JS - Prevent mouse from leaving screen

I need to prevent the cursor from going out of the window. I've read that it's not possible, however I've already done that with a WebGL export from a Unity project. You first had to click the canvas, then the browser would show you a notification…
TheCat
  • 640
  • 1
  • 9
  • 23
0
votes
0 answers

Resolution when enter fullScreen on android Browser

When I was running my unityGL program , I used Screen.fullScreen = true; to enter the full screen mode. It works, I enter fullscreen and I get the resolution same as on my desktop. But when I run it in a Android browser, something is not right. So I…
AM031447
  • 475
  • 1
  • 8
  • 21
0
votes
2 answers

Getting touchInput from a touch that starts outside of the Unity player

I have a Unity WebGL player that is embedded in a React application. The React application has drag and drop tiles that can be drug and dropped onto the WebGL player. When the tiles begin to be drug unity starts raycasting so that you can tell what…
Kyle Richardson
  • 5,567
  • 3
  • 17
  • 40
0
votes
1 answer

Kongregate API (Unity WebGL C#): What happens with the user data if the player is not using an account?

I am interested solely in what happens with the userinfo if a player is not signed into their Kongregate, I need to check for this as I will be saving game progress on a server and of course I don't want to be writing random save records into my…
AlexJBallz
  • 77
  • 6
0
votes
1 answer

Nuxt (vue) and Unity's Unityloader memory leak

I'm loading in a component the unityloader javascript and instantiate in the mounted section of my component. Everything works fine until I click on a router-link or nuxt-link. The DOM is probably modified at that moment and the game instance is…
0
votes
1 answer

How to display Khmer text correctly in Unity

I have some text in Khmer language: "ចូលប្រើប្រាស់" When I put that text in a UI Text component and using a Khmer Unicode font (e.g: Content-Regular.ttf), Unity Editor displays like this image: Is there any way to make Unity Editor and WebGL build…
toancaro
  • 432
  • 3
  • 14
0
votes
1 answer

Unity WebGL - Locating code that triggers Reflection.emit

I've run into the dreaded Reflection.emit issue in my webplayer build and am unable to locate what is triggering it. I'm currently commenting out code method by method and rebuilding to locate the cause and have narrowed it down to the below. I'm…
Reahreic
  • 596
  • 2
  • 7
  • 26