Hello, I have a weird problem with updating a graph at runtime. Here’s a screenshot of the profiler and the astar settings.
This is the code called at runtime, when some object gets destroyed, I need to update the graph:
Bounds astarBounds = new Bounds (transform.position,new Vector3 (range,range,range));
No matter what the range parameter is for the bounds of the update, 1,10 or 100, the lag spike is exactly the same. It happens both in editor and in a runtime build, so although the editor and profiler overhead go away at build time, the camera.render processing doesn’t. I’m using 4 worker threads and a maxed out layered grid graph. I also tried batching and that didn’t change anything either.
Why is the profiler saying that the lag is caused by Camera.render? I disabled anything related to visualization with astar as you can see in the screenshot to the right.