- A* version: [5.2.5]
- Unity version: [2022.3.22]
Hey found a bit weird allocation. I see there is no pooling implement here and each time Path being reset Constraint is set to: PathNNConstraint.Walkable which actually create new instance of class. Any chance to get rid of it ?
Hi
This has been a longstanding issue that would need some more elaborate refactoring and breaking changes to get rid of.
Ultimately I cannot make this change right now, because the PathNNConstraint is mutable and a reference. So creating a new one when the path is being reset is the only safe option.
However, if you know you are careful, then you could change the Path.reset method to only reset all fields of the constraint, instead.