I have been working on a game using Unity 3D (free version) for several months now. It is a project for school and the due date is actually the end of this week. I’ve built three levels and it works perfectly when I try the game in Unity itself: all controls (including the mouse) work fine. Before I (don’t know if this is correct) added the second and third level, I tried building it into .exe and it was still fully functional. However, after I added the second level, when I build my game into .exe, I am unable to look around using the mouse, although I can still move using the arrow or the wsad keys. The camera is locked into one direction and I can’t change it. Is there any way for me to fix this bug? I need to finish my game by the end of this week and it has to be flawless, with completely no bugs in it. I know I am being stupid. I haven’t used Unity for long. I really need help on this, so if possible, please help me quickly. Thank you in advance and (again) sorry for asking a noobish question like this
This post is from literally six years ago, but I found it while trying to fix the same problem and wanted any future travelers to know that there was a solution.
In my case, the culprit was the default Main Camera that I’d left in the scene as an oversight. Leaving this in created no issues in the edit mode version, but did not pan out as soon as I built it out and post-build, the issue would carry over into edit mode until I deleted the player controller and reinstanced it from prefab. Deleting the extraneous main camera solved the problem in both cases.
Hello from the future, OP, I hope your class project worked out okay!,This post is from literally six years ago, but I found it while looking into the same problem and wanted any future travelers to know that there is a solution.
For my version of the problem at least, the solution was I had accidentally left in the default “Main Camera” and while that didn’t affect anything in edit mode, the built-out version didn’t like it. This was also causing the issue to transplant into edit mode until I deleted/reinstanced my player controller. Deleting the extraneous main camera solved the problem in both versions for me.
Edit: it seems to have also boosted my framerate considerably.