So I don't know if this is a Unity problem or an AC problem, but I figure I should ask anyway.
I am trying to prepare a demo for my game but I'm noticing that the built games (PC and webplayer as of now) have framerate issues only in certain spots-
There are only two scenes in which this happens, and it ONLY happens when the game is unpaused and there is no cutscene running. When the player is controlling the character with the cursor is when the framerate drops severely. Also, another instance is when a cutscene is running in the background, and even though player input is disabled, the same choppiness occurs.
Now, the confusing part is that this ONLY happens in the builds, and does not show up at all in the editor game view. In fact, in the game view it runs quite well.
I've searched quite a bit around google to see if this is a known Unity problem, and I've tried various things (using lower quality settings, enabling/disabling most of the build player settings, etc.) and I thought I was onto something when I checked the PC version output log and saw an inordinate amount of "no rigidbody attached" errors. I had seen several people note that the framerate in a build can dip significantly when outputting a lot of errors to the log.
However, I went into the char.cs script and commented out the Debug.LogWarning ("No rigidbody attached"); and tried again, but no luck. Could this script still be causing the problem? If not, does anyone have any ideas? Thanks as always!
Comments
A quick note about point 2): you could also use GameCamera settings to make the camera follow the player, without the need to transform it.
It may also be down to an indefinitely-looping ActionList. Inside the GameEngine prefab, look for the ActionListManager script and check the Show Active Action Lists box - this will display all lists running, and may help you figure out the cause, since you'll know what should be running and what shouldn't be.