SOLVED - Game running incorrectly when built and run

Hey there,

Basically as my title suggests, when I build my game and run it as a standalone executable, some aspects of the game that would usually work in Unity’s game view do not work.

Buttons and mouseover events (just changing the colour of text when the mouse hovers over, using a box collider) are not working correctly when run as a Windows Standalone executable.

Any help is provided and if more information is required, I will be happy to provide it if possible.

Edit: I have tried wih a web player and have gotten the same result.

I’m still getting this error, I thought I would bump my post up to see if anyone can help me resolve the issue. I am really not sure what is going wrong with the project once it is built. When it is in Unity3D before it is built, it works fine. As soon as I build the project, move the required files to another computer and try to run it, a button will function, but after that I cannot click any other buttons.

The coding all works inside of Unity3D, it is only outside, after being built, that the program does not work.

Once again, thanks for any help that can be provided.

Can you perhaps post some code?

Almost all of the code I am using is simple OnMouseUp functions to change scenes because the game is a very simple quiz game.

Here are some screenshots:

This is the block of code on my main scene, when run in Unity3D this functions correctly.

This is my second piece of code for each individual question of the quiz, again, when run in Unity3D it is functioning correctly. I have this code 10 different times for each scene to take the player to the next question. I was unsure of wether or not it was possible to use one piece of code for all of them.

This is a screenshot of my main menu with correctly working OnMouseEnter/Exit script. The mouse is hovered over the Gaming button but screenshots dont capture the mouse.

These are my build settings, in each different piece of code, the numbers have been correctly placed.

This is the first error once run as a standalone executable. You cannot see it, but my mouse is currecntly hovered over the “Gaming” button, unlike my other picture the button is not changing colour when my mouse collides with the boxcollider attached to the text.

This is the last error that is occuring, once again no mouse is shown. In this screenshot, the mouse is hovering over the Return button and it is not changing colour to black. The other error in this scene is, the button itself is not working to take me back to the Main Menu scene. If I go to one of the other scenes and try to continue the quiz from there, the same thing happens. I am able to change scene once, but after that the game will not register button clicks.

I found the source of the error, for some reason it had saved a version of the .exe into the assets folder of unity. After I deleted this copy, my mouse over script and mouse up script were functioning correctly once again :smile:>

i have the same problem but i cannot find the copy version of the .exe in the assets folder, and my OnMouse trigger is still not working, :frowning:

i really appreciate any help and suggestion.

thanks in advance!