Cannot get a WebGL build to Work Properly


#1

Hello,

I have tried to make two different projects with Vinoma and then built them as WebGL builds.

When I put this on my website, the WebGL player loads and the VN main menu displays but nothing happens when I click “Start” on the main menu for the VN.

Also, if I click the Settings button from the main menu, I get the Settings dialog but the is very strange behavior from the “Resolution” buttons. The resolution values change to very strange numbers but mosly “0x0”. The sliders also seem to ‘stick’ to the mouse pointer.

I am using Chrome Version 58.0.3029.110 (64-bit) on a Windows 10 machine.

I have been able to get other WebGL builds (Fungus) to work properly, so I know the Unity WebGL build process itself is working.

Thank You


(Leslie Young) #2

The only tested and mentioned target is stand-alone (PC/Mac/Linux)

Resolution" buttons

I have not worked with WebGL. Are you actually allowed to change the resolution?

… anyway. I will have to download and install the WebGL setup fro Unity before I can run a test to see what might e the problem with starting the scenes. Will get back to you on that.


(Leslie Young) #3

The Vinoma scenes starts fine for me when I press Start.
Make sure you are not getting any error messages in the Unity console when you press Start. It could be that you added something which is causing problems?

As for the resolution thing, it seems you are not allowed to change it.
Simply hide or delete the Settings/Panel/Resolution Object so the player do not see it.
In Vinoma Settings turn off “Resolution Options” so that Vinoma do not try to apply resolution when it starts or when Apply is pressed in the game’s settings window.


#4

Hmmmm. Strange.

I checked the Unity console when I ran the VN and there were no errors.

The only thing I’m doing is literally these four blocks:

Change Background
Enter Scene
Dialog
Wait (Duration set to “0” [for mouse-click])

Those are the only four blocks (I didn’t see one to explicitly end the program.). There is no script at all.

I just did another build and the same thing happens. Very strange. :-/


#5

Sorry, I did a development build and have a proper error message:

“NullReferenceException. A null value was found where an object instance was required.”

Also, the “Wait” block I have is set to “mouseclick” not zero seconds.


(Leslie Young) #6

Must be that nullref but without code line numbers I can’t really tell what causes it.

Since you do not see anything after pressing Start it should be very early, perhaps even before the 1st Action executes. But then I would have the same problem on my side.


(Carine Rousseau) #7

I have the same problem. Not working in blank project too (only two dialogue sentences). Not working with Build and Run too.
Nothing happens with I click “Start”.

Same error when I click on Start Button : “NullReferenceException. A null value was found where an object instance was required.”

When I put Music Menu, I don’t listen in menu in webGL.


(Leslie Young) #8

1st, note that I only officially support stand-alone builds for my products.

Please read this on how to report errors properly. Without the correct information I can not really tell where the problem is. Basically, I need line numbers. There must be some kind of log generated for WebGL. Have a look here on how to find the info.


(Carine Rousseau) #9

Hi,
I opened the JavaScript console on Windows for my build on webGL. The capture 1 shows what I see, the capture 2 when I press Start and captures 3a and 3b, the detail of the error when I click on what I see in the capture 2 lines). I hope it will help.


(Leslie Young) #10

Ye, those are not the same kind of info one get from the editor or stand-alone builds (or even mobile if you enable debug builds). I guess it makes sense since il2cpp changes the source.

So you did generate the link file?

Cause looking at that AddComponent message shows me something which should not happen. SpriteRenderer and AudioSource are Unity defined types. No way they should be missing, except if stripped out of the sources since some optimizer thinks they are not used.


(Carine Rousseau) #11

Hi,

Sorry, I’m complety lost. :frowning: I give you links to see yourself.
I put the game in public_html. Is the good place ?
This is the link for my test online : http://nyumeric.com/test_webgl/
It’s a blank projet with two lines of dialogue.
I tried in https too - https://www.sitepourvous.com/test_webgl/
I tried with Chrome and Firefox both.

I’ve the same report bug (last captures)


(Leslie Young) #12

Oh shoot, sorry, I was thinking of plyGame. But I am guessing the same thing is happening in Vinoma, except Vinoma does not have a link file generator. Read this to see what I am talking about https://docs.unity3d.com/Manual/IL2CPP-BytecodeStripping.html

I am not sure, I am just guessing here but I am thinking some types are being stripped out of the build and that is why those errors comes up. Get rid of these optimizations if they are on and see if that helps.

In the player settings you need to set

  • Api Compatibility Level = .Net (not subset)
  • Strip Engine Code = should be off
  • check if there is anything else that looks like it might be related to removing “code” in an attempt to make smaller builds.

Sorry, I do not work with anything other than stand-alone builds and that is why I do not officially support WebGL, mobile, and other builds - I can not provide proper support for it and can only help so far with resolving an issue like this one now.


(Carine Rousseau) #13

You are THE BEST !!! :trophy:

It’s work perfectly, thank you very much :grinning: