sturdyspoon / unity-movement-ai

A Unity library for common movement AI
MIT License
1.95k stars 280 forks source link

debugDraw runs in builds #16

Open tonygiang opened 3 years ago

tonygiang commented 3 years ago

While profiling a game using this library on a real device, I spotted this:

2020-10-09 09_56_10-

The debugDraw coroutine in MovementAIRigidbody will take up more time per frame during more crowded segments, sometimes consuming nearly 1ms per frame. This should not be happening. Ideally, this coroutine should only be run inside an #if UNITY_EDITOR block.