Hi Aron,
I’m editing this as to not start a new thread, my old question about deserialization and my solution
are below. Anyway, my current issue is with stitching via UpdateGraphs() on recastgraphs.
So, I still need to break up the world into serialized recastgraphs. No problems streaming them in, but still wrapping my head around stitching them together. My process is convoluted and I’m wondering if there’s a better way.
So, I create and serialize the recastgraph chunks. On each chunk I line the border with a large number of node2 objects. This is tedious and time consuming, considering the scale of each graph. I also worry about all the added transforms piling on the performance
Question 1) Is this process of adding a ton of node2s ill-advised? Are there runtime performance issues with having so many nodes?
During runtime I load the graphs, then I do an UpdateGraphs() across the border where the nodes are. This is always where it hitches up (both to initiate the update and then on the queued update itself).
Question 2) Is there a better way to update? I don’t need to actually modify the graphs at runtime, I only need to update the walkability of these nodes. I’ve attempted to disable ‘rasterize terrains’ but then it screws up the serialized graph, which was originally conformed to the terrain. Right now the performance hitch is unacceptable.
Question 3) There’s an issue whenever one of these recastgraphs is loaded, a separate PointGraph is added. The problem is that when I unload the recastgraph, the PointGraph remains. With enough time it’s possible to pile on a massive number of unused PointGraphs in the scene. Is this a performance issue, and are there ways around it? Thanks.
Old question, solved by threading and so far seems stable as long as I’m pausing pathfinding:
I’m having a bit of a performance issue with DeserializeGraphs and am wondering if I’m approaching this wrong.
I’ve broken up my world into 2048 chunks and am creating/saving a recast graph for each into a .byte file. Ideally I’d be working with settings that create roughly a 1.5mb byte file, and I have no problem streaming it in with (TextAsset)Resources.Load.
However there’s a noticeable hitch when I use DeserializeGraphsData or DeserializeGraphsAdditive. Even if I get the byte file size down to say, around 300k, I’m still seeing a hitch. Is there any way to avoid this? Perhaps by pausing the rest of Astar? Or perhaps there’s a threading setting I’m missing? Many thanks for any advice.