Objects moving slowly in preview.

I have a project with 5 scenes. (2d platformer side-scroller game)

In each scene, there are objects that move (controlled by a movement script). The speed at which they move is static. Nothing in my environment has changed over the course of game development.

Now for some reason, during preview, my objects move much much slower than before (SO SLOW) it’s hard to ‘test’ my game so to speak. Only objects with a movement script attached (I have a few different movement scripts) are affected by this slow-down (these are things like moving platforms, enemies, props etc).

When I execute the game as a desktop app, objects move at the correct/normal movement speed.

What could be causing this slow-down in preview? Anyone have a clue? I would be happy to provide more detail.

You have written your movement scripts to be tied to the framerate of your game (which varies from machine to machine, and even from one moment to the next on a given machine).

If your computer runs at 60FPS, your object is moving “step” amount 60 times every second. If your computer slows down (perhaps your antivirus program starts a hard drive scan, or some other background process is running) and your framerate drops to 30FPS, your object will half its speed too.

You need to learn about Time.deltaTime to make your objects move the same speed, whatever the framerate at which your game is running.