Hi,
I'm creating point&click type of game with Adventure Creator, but there is currently an issue with the drawcalls.
I have custom made navmesh (same method as in demo), and every time when I click outside of the navmesh, there seems to happen something with the drawcalls.
There is attached image that shows one of the spikes when drawcalls are more than 6000. It causes a big impact for the performance.
I don't know that is it causing it because now the player seems to trying to walk even if I click outside of the navmesh? So if I click outside the navmesh the raycast somehow cannot find it and causes the lag?
Is there any ways to fix that when you click outside the navmesh (example the walls) the player don't try to move in that point if there is not any navmesh placed?
Thanks!
Comments
But if you add something between 0-1 it starts again.
The drawcall problem seems to come even if the "NavMesh search %" is set to "0.1". If you click for the walls that are enough far away from the navmesh and the raycast search area, then it works but when it's enough close to navmesh and it trys to use NavMesh search % then the problem occurs.
When the NavMesh search % is non-zero, clicking outside the NavMesh will invoke an algorithm that checks to see if one is nearby. Setting it to zero disables the function, which is why even a value of 0.1% causes a slowdown.
What's the resolution of your game?
There is not yet made any critical changes for the default Unity setup. In game drawcalls currently are about 30.
So would it be that the looking more towards to the resolution setup could fix that drawcall spike or could it be in code?