Lag with Unity Windows

Hi,

I have this issue I am trying to figure out. I’ve always been working on a MacBook Pro (bought in 2008) but now I want to change for the windows version so I can work on a desktop (which in my opinion is more comfortable).

The issue is that the game lags when I test without building. While on my Macbook pro the game ran very smoothly, it lags on windows. My PC is pretty good (ATI HD5870, 4 GB RAM, Intel core i7). What seems different is the update function which has a much lower rate of refresh. The FPS starts high, but slowly drops to horrible. What is weird is that even when the FPS (on the stats list) is high (500-600), the game lags. When I actually build the game it runs extremely fast (way too much). I tried to play the game on other PCs and had the same issue, so this isn’t specific to my computer.

Has anybody had a similar problems. I tried out island demo and it doesn’t seem to lag very much.

i don’t have an answer but i can say i’ve had similar problems. Game runs fine for a while (30 sec to a few minutes) then lags horribly. For me, if you wait awhile, it stops lagging and goes back to normal and then later lags some more

i don’t know if my issue is the same as yours but here’s what i can tell you about mine:

  1. The game runs fine on several other people’s PCs, so it’s presumably not the game (the prime culprit therefore is obviously me, not Unity)

  2. It happens on both of my games

  3. We thought it was garbage collection so we switched to pooled objects (manually created a pooling mechanism) and that made no visible difference (we do all scripting in C#)

  4. When it happens, videos and music playing in other apps (Windows Media Player, Firefox, Chrome) also lag horribly

  5. When it happens and WMP or Firefox are running, overall CPU jumps to 100%, split evenly between the apps (Unity, WMP, Firefox and Chrome, whichever are running)

  6. When it happens and nothing else is running, the CPU is ~50%. So plenty of CPU left but still horrible lag (note: i have a dual core which might explain this)

  7. The lagging never happens in any application unless Unity is running

  8. If i’m in the editor and stop playing and start again, lagging goes away for awhile

i haven’t tried this on my macbook so i can’t say anything about that - all of us have switched to Windows now

i have a different issue that i mention because it might (or might not) be related. When Unity is running, i can’t open up any new Explorer windows to look at my files. i used to have to close Unity to open a folder but we’ve since learned that we can go into Process Explorer and kill Unity’s child 3dsMax process and they open

Just a thought… are you using Time.deltaTime to make the game’s movements independent of framerate? If not you will find that objects in the game move at different speeds on different hardware (or the same hardware under different load).

i don’t know about Sabinrenefigaro but me personally, we’re making a dress-up game where there really is no movement of any kind other than a single doll that animates when you put clothes on it. When the game starts to lag, the animation looks like someone doing that robot dance

We’ve also made a tower defense game so i’ll check on that one, although i think we just say “move to marker”, we don’t manually move the creeps on Update

I’ve had the very same problem. In fact, it caused me to make my game way too fast, because as said, it only lags in the editor. Once you build it, the build runs at the correct speed. So everything in the build was way sped up.

A similar bug has been reported, but I don’t think it is exactly the same as this. Please can you file a bug report for this (menu: Help > Report A Problem).

Hi,

I’ll have to try to use time.deltatime. I have discovered something new about this. Actually, it may not be dependant on the OS, but rather the screen I am working on !

When I work on 2 screens (one being Macbook pro the other a standard screen), the game runs fast on the mac screen but lags when I slide it on the other screen ! Could this have something to to with the screen refresh rate or something ?

Thanks again

edit : It’s Sabin, I just realized I made two accounts by mistake. My bad.

Could have something to do with graphics card