I have tried going through and disabling all the settings I could find regarding gizmos/lines, but some things, like NavMeshCuts, there is nothing I can find to disable.
I ended up having to move the package to my Packages folder, not in the normal PackagesCache, then manually editing DrawingManager.cs to disable itself upon entering play mode.
However, this is just a hack. Obviously, this is not ideal functionality.
Yeah, that method has been annoyingly slow. It’s surprisingly hard to just check if a bunch of objects still exist in Unity. But I think I have an alternative solution that would have better performance.
Would you mind trying with a newer version of Unity. It seems like in more recent versions of Unity, the null checking has been optimized significantly and thus this method should be a lot faster.
Hello,
i also have the same problem with our project that the DrawingManager.RemoveDestroyedGizmoDrawers() takes up a lot of time to complete. We updated our unity version to 2022.3.8f1 and are using the beta version 4.3.79. In our project a newer unity version didn’t improve the performance at all.
Any update on this or anything we can do to improve the performance? We aren’t using ALINE at all.
@HanHan Do you think you could post a screenshot from the unity profiler?
I just did some benchmarks, and I really can’t get that method to become slow at all. Even with 5000 objects, each of which only draw a single line, the overhead of that method (about 0.1ms in total) is insignificant to the cost of drawing all of those lines.
I’m making some changes for version 1.7.3 of ALINE, which I think might improve performance for you.
By the way. I can see that Filter Destroyed Objects in your profiler screenshot has a foldout arrow. That’s weird, because there shouldn’t be any markers nested deeper than that (unless you are using deep profiling). Can you see what is nested there?
i updated my A* Pathfinding Package from 4.3.92 to 4.3.94 and it did improve the performance a bit. Some frames now only need about 1.5ms other up to 4ms but still better then before. Since we are not using ALINE at all it would be cool if we could disable the behaviour if it’s possible to even get more fps in editor.
Actually i don’t have the marker anymore in 4.3.94. I was using the version 9.3.82 while i was capturing the screenshots so i think the function changed during the last updates?
Also we are using multiple cameras thats why we have multiple calls to ALINE in different stacks.
Yes we have a lot of agents in our scene around 2,000 each of them with a seeker and RVOController component. But only ~40-50 are active at the same moment the rest of them are deactivated and will be activated if the player is in the area. So i could say that i don’t need the gizmo rendering when the agent is deactivated but even when disabling the seeker or RVO component, ALINE is still doing something.
Is there any setting i can use to disable the gizmo drawing when my agent is disabled?