Build is acting differently than in the editor.

When I run my game inside of the Unity editor, everything works fine.

When I run the game inside of the web browser, everything appears to work fine as well.

When I run the build of the game, that’s when the behavior gets strange. Windowed mode works fine, but running the game fullscreen makes my character physics get all screwed up. There’s so much friction on the floor that walking forwards moves you backwards, though in-air movement is fine. Jumping gets very choppy and I’ll more than likely fall through the floor if I double-jump.

Here’s a web link to the game, it’s just a simple movement test. http://andrewkennedy3d.com/PMT_WebBuild.html (Arrow keys to move, Space/Z to jump)

A friend of mine gets the same odd behavior whenever he runs the game in the web browser. We’re both using Chrome. When he runs the build of the game, it works fine fullscreened or windowed.

There’s clearly something strange going on here. My character controller is the 2D Platformer Controller from the Asset Store, which uses Raycasts for all the collision detection, so my first thought is that something very low-level is occurring with the physics to cause this. Yet the inconsistency is making it hard for me to narrow down what the problem could be. I had a similar error a few weeks back where running camtasia was causing my character to enter a permanent walking state instead of running state. And no, it wasn’t just framerate slowing down, everything else was running fine, I moved just fine while jumping and nothing was choppy.

Help me Unity community, you’re my only hope! What’s going on behind the scenes here that I’m missing?

Build an offline version of your project and run it, then open the file output_log.txt in your build directory and see if there are any error messages.

One possible problem coud be that any functions called or raycasts…raycasted :slight_smile: are called from the wrong function, such as in OnGUI() instead of Update() or FixedUpdate().