Basically, can you make a version two after you export, and will the changes also appear in WebGL?
I am using a mac.,
↧
can you make changes to your project after you export it?,can you export your game and make changes after that?
↧
Need help on APIs for my WebGL related project.
Hi, I am working on a project related to WebGL. My project aims to implement a plugin for Unity 3D to build a webGL related application. I have found out that I need to rewrite some of the JavaScript functions in the Unity compiled Build.js file. I wonder if I can get some help from Unity for API support on my project.
Does anyone know who I should contact with or any documentation on this?
Thank you very much!
↧
↧
WebGL only showing an empty folder after building. How to fix?
Hello. I've been trying to export my game but I'm stuck at one point. After its done building, and I click on my folder, all that shows up is an empty folder. I'm sure that it's supposed to display the elements that make up my game and an index html, but none of that is showed. This is the error that comes up:
FileNotFoundException: Could not find file "C:\Users\antonette\Dana\How To Make A Simple Game In Unity Experiment\Temp\StagingArea\Data\Native\build.bc"
System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) (at :0)
System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share) (at :0)
(wrapper remoting-invoke-with-check)
I've been following Brackeys tutorial: https://youtu.be/7nxKAtxGSn8
Thank you in advance!
↧
WebGL Build strange exception
Hey there community,
out team created a small WebGL project with an PHP Interface to our SQL Database.
In Unity everything works just fine (registration, login, updating player data...).
As soon as we build our **WebGL Build**, we were able to go through the registration form and create a new user. But as soon as we continue to the login function, the following exception appears:
**"IndexOutOfRangeException: index was outside the bounds of the array"
"> System.String.get_Chars (System.Int32 index) (at <00000000....>:0)"**
My first thought was, that the MySQLi method does not work properly via **WebGL**, but again, we were able to register an new user.
For **Debugging**, we've tried to make a **Standalone PC Build,** and again, everything works just fine. It has to be something in **WebGL**.
Perhaps someone here might know, whats the issue is? Did we miss something?
Our Unity ver. is **2018.3.0f2**
Best,
Tony
![alt text][1]
[1]: /storage/temp/137198-webgl-issue.png
↧
unexpected character at line 1 column 1 of the JSON data
I'm trying to insert a game into an asp.Net mvc but when I compile the following error occurs:
An error occurred running the Unity content on this page. See your browser JavaScript console for more info. The error was:
SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
My code:
![alt text][1]
Mimemap on Webconfig:
![alt text][2]
Json:
{
"companyName": "DefaultCompany",
"productName": "Jogo da memoria teste",
"dataUrl": "memoria.data.unityweb",
"wasmCodeUrl": "memoria.wasm.code.unityweb",
"wasmFrameworkUrl": "memoria.wasm.framework.unityweb",
"TOTAL_MEMORY": 268435456,
"graphicsAPI": ["WebGL 2.0", "WebGL 1.0"],
"webglContextAttributes": {"preserveDrawingBuffer": false},
"splashScreenStyle": "Dark",
"backgroundColor": "#231F20"
}
[1]: /storage/temp/137131-unity-error.png
[2]: /storage/temp/137132-myme.pngJ
I don't know what's happening, can anyone help me?
↧
↧
Hey guys can anyone tell me whether is it possible to have this type of graphics in unity webgl ?
https://www.malibuboats.com/boat-configurator
https://www.genesis.com/us/en/genesis.html/#/car-configurator/G70/792NA800
I am creating some online 3d configurators. So can anyone guide me how can I achieve such graphics in unit3d WebGL as that in the link if possible? If not can anyone tell in which engine they are created?
I am trying to figure this out from the last few weeks but in vain.
Thanks in advance.
↧
WebGL Input - KeypadEnter registering as Return
**Short version:**
I'm making a game in WebGL and I need to be able to distinguish between KeypadEnter and Return (two very different keys on a keyboard).
However, in the browser build of my game, all KeypadEnter inputs somehow register as Return. That is, `Input.GetKey(KeyCode.Return);` returns TRUE and `Input.GetKey(KeyCode.KeypadEnter);` returns FALSE when the KeypadEnter key is being pressed.
Why does this happen?
(If you want to know exactly how I found the issue, keep reading.)
----------
**Long version:**
I made a test scene with a text object that prints out each key that is being pressed each frame.
`void Update() {
TextMesh text = GetComponent();
text.text = "";
if (Input.anyKey) text.text += "anyKey\n";
for (int i = 0; i <= 509; i++)
{
if (Input.GetKey((KeyCode)i)) text.text += ((KeyCode)i).ToString() + "\n";
}
}
`
When in the Unity Editor, when I press the Return key I see:
![alt text][1]
and when I press the KeypadEnter key, I see:
![alt text][2]
This is exactly what I want to see.
However, after I build the project to WebGL and upload it to Gamejolt, things stop working. I press the KeypadEnter key and I see:
![alt text][1]
Same for when I press the Return key. Essentially, in a WebGL browser build, both Return and KeypadEnter register as Return. This doesn't make any sense to me. Anyone else have this issue or know how to fix it?
If you need more info from me to help answer my question, feel free to ask clarifying questions.
[1]: /storage/temp/137475-untitled.png
[2]: /storage/temp/137476-untitled2.png
↧
VideoPlayer when building for webGL
Hi i would like to render a video on a material for my scene. Very easy you will say and i'll answer that you are right.
But my problem is when i want to build in WebGl the build works fine but i got an RunTime error during the launch of the page with incomprehensible error ( see below )
![alt text][1]
[1]: /storage/temp/137437-errorwebgl.png
My research have bring me at this previous question on the forum : https://forum.unity.com/threads/videoplayer-webgl-url-not-working.467391/.
But nothing from this post solve the problem and actually nobody really answer to the problem.
I tried 3 solution until now :
- the default way where in the editor i drag the video in the component
- I tried to create a web server for hosting my video and create a litle C# script where i set the url in the VideoPlayer component.
- I tried to replace the url with the streamingAssetsPath way by creating an StreamingAssets repertory and by using System.IO.Path.Combine(Application.streamingAssetsPath,"myFile.mp4")
Nothings seems to work and i really don't find nothing on the net so if anybody got a solution or a tips for this problem it couldbe very helpfull for me ^^
↧
How to build AssetBundles for WebGL?
I'm trying to build an AssetBundle with a build target of WebGL but it doesn't seem to work. I'm using the code from the documentation [here](https://docs.unity3d.com/Manual/AssetBundles-Workflow.html), it works fine if the build target is `BuildTarget.StandaloneWindows` but when I change it to `BuildTarget.WebGL` it throws errors and doesn't build the bundles.
using UnityEditor;
using System.IO;
public class CreateAssetBundles
{
[MenuItem("Assets/Build AssetBundles")]
static void BuildAllAssetBundles()
{
string assetBundleDirectory = "Assets/AssetBundles";
if (!Directory.Exists(assetBundleDirectory))
{
Directory.CreateDirectory(assetBundleDirectory);
}
BuildPipeline.BuildAssetBundles(assetBundleDirectory, BuildAssetBundleOptions.None, BuildTarget.WebGL);
}
}
It gives the following errors when trying to build the bundle:
Library\PackageCache\com.unity.multiplayer-hlapi@1.0.2\Runtime\NetworkDiscovery.cs(317,30): error CS0117: 'NetworkTransport' does not contain a definition for 'SetMulticastLock'
Library\PackageCache\com.unity.multiplayer-hlapi@1.0.2\Runtime\NetworkDiscovery.cs(348,30): error CS0117: 'NetworkTransport' does not contain a definition for 'SetMulticastLock'
Library\PackageCache\com.unity.multiplayer-hlapi@1.0.2\Runtime\NetworkDiscovery.cs(388,30): error CS0117: 'NetworkTransport' does not contain a definition for 'SetMulticastLock'
Library\PackageCache\com.unity.multiplayer-hlapi@1.0.2\Runtime\NetworkDiscovery.cs(449,34): error CS0117: 'NetworkTransport' does not contain a definition for 'SetMulticastLock'
Library\PackageCache\com.unity.analytics@3.3.2\DataPrivacy\DataPrivacyButton.cs(28,13): warning CS0618: 'Application.ExternalEval(string)' is obsolete: 'Application.ExternalEval is deprecated. See https://docs.unity3d.com/Manual/webgl-interactingwithbrowserscripting.html for alternatives.'
Error building Player because scripts had compiler errors
These errors appear for both `BuildTarget.WebGL` and `EditorUserBuildSettings.activeBuildTarget`. Is there something I'm doing wrong here? I thought it might have just been a problem with the Unity version, but after updating to `2019.1.1f1` I still run into the issue.
↧
↧
brightsign and unity...HELP !!!
Hello, I developed a small application on Unity that I would like to run on brightsign. When I encode the project in WebGl, the unity WebGl window appears but my application does not launch ...
Could you help me ?
↧
Unity 2019.1.0f2 WebGL build failed
I tried building my project to WebGL but was met with this error
Exception: Failed building WebGL Player.
UnityEditor.WebGL.ProgramUtils.StartProgramChecked (System.Diagnostics.ProcessStartInfo p) (at /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/ProgramUtils.cs:48)
UnityEditor.WebGL.WebGlBuildPostprocessor.EmscriptenLink (UnityEditor.Modules.BuildPostProcessArgs args, System.Boolean wasmBuild, System.String sourceFiles, System.String sourceFilesHash) (at /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:446)
UnityEditor.WebGL.WebGlBuildPostprocessor.LinkBuild (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:496)
UnityEditor.WebGL.WebGlBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:931)
UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at C:/buildslave/unity/build/Editor/Mono/Modules/DefaultBuildPostprocessor.cs:27)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:281)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
↧
Text copy/paste into input field in a WebGL app: is there any solution ?
I'd like to know if there is a solution to allow paste/copy for Input Field in a WebGl app.
Thanks
↧
WEBGL load text file
How to fetch the text file data from the streaming assests folder in the WEBGL build when the WEBGL build is put in the server
1) when loaded from the server the webgl should load the data from the text file kept in the streaming assest folder inside the build
↧
↧
Allocate more memory for WebGL
I get memory allocation errors when attempting to load my WebGL game, and the solution appears to be changing memory size under publishing settings as seen here:
![alt text][1]
[1]: /storage/temp/137776-screenshot-30.png
However, That option does not show up for me:![alt text][2]
[2]: /storage/temp/137777-screenshot-28.png
What am I supposed to do to change the memory size and get my game working?
↧
Textinputs not working when I implemented "Unity webGL" in VueJS Project
I'm doing in my work educational curses with VueJS, when I export Unity resources, the text inputs and text area, are not working.
![alt text][1]
[1]: https://user-images.githubusercontent.com/9289861/57390715-fa48a080-718a-11e9-9008-8881fa5d8da2.PNG
The call:
The component:
Vue.component('unity', {
template:`
`,
props: {
src: String,
module : String,
width: String,
height: String,
externalProgress: String,
unity_loader: String,
hideFooter: Boolean,
},
data () {
return {
gameInstance: null,
loaded: false,
progress: 0,
error: null
}
},
methods: {
onClick () {
this.$refs.myInstance.message("object", "method", "param")
},
fullscreen () {
this.gameInstance.SetFullscreen(1)
},
message(gameObject, method, param) {
if (param === null) {
param = ''
}
if (this.gameInstance !== null){
this.gameInstance.SendMessage(gameObject, method, param)
} else {
console.warn('vue-unity-webgl: you\'ve sent a message to the Unity content, but it wasn\t instantiated yet.')
}
}
},
beforeMount() {
console.log(this.unity_loader)
console.log(this.src)
if (!this.eventBus) {
this.eventBus = new Vue({
data: {
ready: false,
load: false
}
})
}
if (typeof UnityLoader === 'undefined' && this.unity_loader && !this.eventBus.load) {
const script = document.createElement('SCRIPT')
script.setAttribute('src', this.unity_loader)
script.setAttribute('async', '')
script.setAttribute('defer', '')
document.body.appendChild(script)
this.eventBus.load = true
script.onload = () => {
this.eventBus.ready = true
this.eventBus.$emit('onload')
}
} else {
this.eventBus.ready = true
this.eventBus.load = true
}
},
mounted () {
const instantiate = () => {
if (typeof UnityLoader === 'undefined') {
let error = 'The UnityLoader was not defined, please add the script tag ' +
'to the base html and embed the UnityLoader.js file Unity exported or use "unityLoader" attribute for path to UnityLoader.js.'
console.error(error)
this.error = error
return
}
if (this.src === null) {
let error = 'Please provice a path to a valid JSON in the "src" attribute.'
console.error(error)
this.error = error
return
}
let params = {}
if (this.externalProgress) {
params.onProgress = UnityProgress
} else {
params.onProgress = ((gameInstance, progress) => {
this.loaded = (progress === 1)
this.progress = progress
})
}
if (this.module) {
params.Module = this.module
}
this.gameInstance = UnityLoader.instantiate('unity-container', this.src, params)
}
if (this.eventBus.ready) {
instantiate()
} else {
this.eventBus.$on('onload', () => {
instantiate()
})
}
}
});
↧
UnityWebRequest error on WebGL
Hi!
Im having a lot of problems with UnityWebRequest and WebGL. My code is this:
static IEnumerator GetText(string web)
{
Debug.Log("Iniciando petición" + web);
UnityWebRequest webRequest = UnityWebRequest.Get(web);
using (webRequest)
{
yield return webRequest.SendWebRequest();
if (webRequest.isHttpError)
{
throw new Exception("Could not connect to backend: " + webRequest.responseCode);
}
// Player results ID
Player.Id = webRequest.downloadHandler.text;
Debug.Log("User added!");
In editor It works perfectly, but when we try it in WebGL browser lauch this error, when this line is executed: yield return webRequest.SendWebRequest();
An error occurred running the Unity content on this page. See your browser JavaScript console for more info. The error was:
uncaught exception: abort("To use dlopen, you need to use Emscripten's linking support, see https://github.com/kripken/emscripten/wiki/Linking") at jsStackTrace (Ches81 WebGL.wasm.framework.unityweb:2:15158)
stackTrace (Ches81 WebGL.wasm.framework.unityweb:2:15329)
onAbort@http://chess81.x10.bz/Build/UnityLoader.js:4:9322
abort (Ches81 WebGL.wasm.framework.unityweb:2:497045)
_dlopen (Ches81 WebGL.wasm.framework.unityweb:2:222751)
@blob:http://chess81.x10.bz/74023ca5-995f-4e9a-8ade-19570c9d9fd9 line 2 > WebAssembly.instantiate:wasm-function[46858]:0xdff4b1 (blob:http://chess81.x10.bz/74023ca5-995f-4e9a-8ade-19570c9d9fd9 line 2 > WebAssembly.instantiate:wasm-function[46429]:0xded5a3)
...
Please Help!!!!
PD. May be @jonas-echterhoff knows... XD
↧
Mesh particle effects are not showing up in WebGL build
Hi guys,
In the editor and in the standalone build my mesh particle effects are showing up just fine, but when i build for WebGL, I don't see anything. For the materials i'm using the particles/standard surface shader. I've tried the standard unlit but this doesn't change anything. I also tried including the shaders in the quality settings but this didn't have any effect. This only happens with mesh particle effects. I'll include my render settings down below.
This is how the particle effects should look like:
![alt text][1]
My render settings:
![alt text][2]
Does anyone know what the problem could be?
[1]: /storage/temp/138099-clouds.png
[2]: /storage/temp/138096-render-settings.png
↧
↧
UnityWebRequest error on WebGL
Hi!
Im having a lot of problems with UnityWebRequest and WebGL. My code is this:
static IEnumerator GetText(string web)
{
Debug.Log("Iniciando petición" + web);
UnityWebRequest webRequest = UnityWebRequest.Get(web);
using (webRequest)
{
yield return webRequest.SendWebRequest();
if (webRequest.isHttpError)
{
throw new Exception("Could not connect to backend: " + webRequest.responseCode);
}
// Player results ID
Player.Id = webRequest.downloadHandler.text;
Debug.Log("User added!");
In editor It works perfectly, but when we try it in WebGL browser lauch this error, when this line is executed: yield return webRequest.SendWebRequest();
An error occurred running the Unity content on this page. See your browser JavaScript console for more info. The error was:
uncaught exception: abort("To use dlopen, you need to use Emscripten's linking support, see https://github.com/kripken/emscripten/wiki/Linking") at jsStackTrace (Ches81 WebGL.wasm.framework.unityweb:2:15158)
stackTrace (Ches81 WebGL.wasm.framework.unityweb:2:15329)
onAbort@http://chess81.x10.bz/Build/UnityLoader.js:4:9322
abort (Ches81 WebGL.wasm.framework.unityweb:2:497045)
_dlopen (Ches81 WebGL.wasm.framework.unityweb:2:222751)
@blob:http://chess81.x10.bz/74023ca5-995f-4e9a-8ade-19570c9d9fd9 line 2 > WebAssembly.instantiate:wasm-function[46858]:0xdff4b1 (blob:http://chess81.x10.bz/74023ca5-995f-4e9a-8ade-19570c9d9fd9 line 2 > WebAssembly.instantiate:wasm-function[46429]:0xded5a3)
...
Please Help!!!!
↧
Where to find demo of WebGL using Post Proc V2 ?
I am looking for WebGL demos that show the Post Processing Stack version 2 in action.
Thanks
↧
WebGL - InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable
Hi there,
I want to change the url in the browser, according to several buttonNames, once the buttons are pressed.
I try to change the url via javascript with this javascriptlibrary.
QueryHandler.jslib
var QueryHandler = {
GetParam: function(){
var level = "";
var queryString = window.location.search.substring(1);
var params = queryString.split("&");
for (var i=0; i ; Context handle 1 UnityLoader.js:4:9380
WARNING: Shader Unsupported: 'Standard' - Pass 'META' has no vertex shader
UnityLoader.js:4:9380
UnloadTime: 0.000000 ms UnityLoader.js:4:9380
Use of the motion sensor is deprecated. 9d80b04b-1533-48a2-9bd1-f8f333642324:2:228360
Use of the orientation sensor is deprecated. 9d80b04b-1533-48a2-9bd1-f8f333642324:2:228360
Maybe someone is realy into this topic and help me ?! :)
↧