Performance Questions

Hi, I’ve been working on my project for awhile now and have recently been encountering performance issues in Unity. I am still early on in development with a long way to go, so I’m pretty worried about it. Add to that I haven’t yet introduced many graphics elements.

When running the game I encounter glitches frequently and it even freezes for several seconds occasionally.

SOME SYMPTOMS / NOTES

.I’m using Unity Pro

.Basically everything is built with Playmaker, not code

.I have a brand new powerful PC

.I really noticed this starting when I began using Unity’s new Mecanim system. I tend to blame it for all my problems but am not sure.

STEPS I’M TAKING

.Re-installed Unity (No difference)

.Keeping Mecanim interaction super simple.

.Cutting down on actions in Playmaker that run every frame (Does this help?)

Here’s an image of the Unity Profiler while the game was glitching. Thank you for any help / insight.

If your frame rate is generally ok, but you’re having hiccups in performance, then the things I would look at are below:

  1. Loading assets: Are you loading anything in runtime? Loading textures will often create hiccups.
  2. Networking: If you have networking, then that’s a whole thing in itself.
  3. Creating and deleting GameObjects: Are you creating or destroying GameObjects in runtime? Creating or destroying a few GameObjects should not be a problem, but if you’re dealing with tens or hundreds of GameObjects, then you can have significant slowdown. I was actually surprised when I found that Destroying Objects can add up fairly quickly. This is especially bad if you have collision on the GameObjects.
  4. Garbage Collection: If you’re creating and deleting a lot of stuff on the Heap, then this could be a problem. Shouldn’t be more than a hiccup, but it can be noticeable.