Lag / latency when moving a Gameobject on build but not on editor.

Hi I’m using a world on the coherence dashboard to test movement and im getting huge latency when testing via a build. This happens between builds (ie two builds connected to the coherence world on the same computer both see lag from the other connected player).

But weirdly enough an editor version connecting to the world will produce extremely smooth replicated movement on other builds that are connected.

Any ideas on what is causing this?

Many thanks.

Hey, make sure “Run in Background” is enabled in the player settings.
Screenshot 2024-09-16 at 3.35.29 PM

Ok will do. Thanks :+1:

Hi, it appears I had run in background enabled already. I tried rebuilding to make sure the build had run in background enabled but still having the same issue.

Hmm. Are these WebGL builds, or standalone?
In WebGL, performance decreases incredibly when the build goes in a background tab.

Hi, no its just a regular windows build on my local machine, using unity 6.

I have a video now to show the differences.

If you need any more information let me know.

Many thanks.

Ok this definitely is being caused by run in background not being enabled, but it is definitely selected in the project settings so must be a unity bug, not sure if its just unity 6 preview or if anyone else has experienced this in other versions.

Hmm hard to say… can you share the movement code?
And also the configuration of the CoherenceSync?

Hi Ciro, sorry i could not get back to you sooner on this but the good news is this not a coherence issue at all, but appears to be a performance / framerate issue when the window looses focus specifically on builds (editor performance is unaffected by this).which initially i thought was latency, but it affects builds not even using coherence as well.

It may be related to this forum issue here Standalone Build extremely slow when run in Background - Unity Engine - Unity Discussions.

luckily as editor performance is unaffected I should be able to use ParrelSync for testing.

Cheers :+1:

1 Like

Great to hear, and also thanks a lot for taking the time to write it back! I’ll mark your reply as a Solution then, for now.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.