Improve performance in UCC2 and Agents

Justin, waiting for your manual to improve performance when we have many AIs running UCC2.
Meanwhile can you please elaborate a bit how can we call the Character controller to disable or run at lower times ? Also would be great any recommendation for BD, as I have all my AIS with UCC2 + BD (awesome combination, by the way:)

For instance, on the example bellow with myRenderer.isVisible we may know if is within the frustum of the camera, so how can we call the character to disable components that are expensive? And on BD also..... Thanks.

private Renderer myRenderer;

void Start()
{
myRenderer = GetComponent<Renderer>();
}
void Update()
{
UpdateTransformPosition();
if (!myRenderer.isVisible)
{
DisableAnimations();
}
}
 
Before starting on this aspect I would first try changing all of your AI agents to use LateUpdate instead of FixedUpdate for the Animator Update Location. This along might give you the performance that you need.

From there you'll want to use the CullingGroup API to decide when the cull an object. If the object isn't visible you can then prevent animations/effects from running though this will take some modification within the controller to do correctly. You're giving me a few ideas to try. In the meantime I would just start with LateUpdate to see how much that helps.
 
Top