Hi,
I'm having a problem were I got 6 NPCs and they make the game going at very low frame rate (20-25 fps). I got around a solution where I started the game with each NPC deactivated, then when the game started I turned them on by script. Doing this seemed to work really good, i was getting over 150 fps. But now I realized that doing this alters the comunication with the mecanim animations, the signal for the variables IsTalking is not being send.
Other similar problem is that I tried to remove an object (a simple mesh) using an action list, but when I did this the frame rate decreased the same way that NPCs did (dropped more than 100 fps).
I've searched through the forums but I haven't find anything like this yet.
I'm using the version 1.53d
Comments
First of all, please back up your project and update to the latest version of AC v1.55c. Any issues reported must be confirmed to exist in the latest version before any fix can be made.
For the NPCs, we will need to see if this is an issue with AC, or a performance issue with Unity / Mecanim. Create a new scene and place them in it, but without any of AC's scripts. Does the framerate improve?
We will also need to know more about them. What are they all doing in the AC scene? How complex are their Animators? The more info / screenshots you can provide, the better we can advise.
For the object removal, does the frame-rate decrease permantently from then on, or is it just temporarily?
You can use Unity's Profiler while running your game to help determine the source of the slowdowns. If you find that this is linked to an AC process, please post a screenshot showing the full Profile window so that we can examine it.
I'm afraid I'm having trouble viewing the images - would you mind posting them on imgur.com?
The NPC issue appears to be because AC is outputting messages to the Console window - these are likely warnings about something wrong with your NPCs.
If necessary, you can disable AC's messages from the top of the Settings Manager, but you should open the Console to see what the messages are.
For the object issue, we'll need to do a bit more profiling. First, however, temporarily remove the Highlight component so that we can see if this is affecting it or not.
In this shot, you can see that the BehaviourUpdate is the issue - but you'll need to expand the field so that we can see what inside it is the issue. Try to dig down as deep as you can - you can use the "Total" and "GC Alloc" values to find the largest contributor.