Hey,
I was wondering if some of the logic that changes some of the graph values could be made accessible through a function. I was creating some graphs through an editor script and calling graph.SnapForceBoundsToScene() gives me different values than if I pressed the button in the inspector. Currently alot of tidying up of the values is done in OnInspectorGui()
Cheers
That is good advice in general. However, this particular button should do the exact same thing that the function call does.
Well for what I was doing I was calling graph.SnapForceBoundsToScene() and then calling AstarPath.active.Scan(), this gave me a graph with zero nodes because one of the graphs I was creating happened to be just a few flat meshes. But if you pressed the button it sets some minimum values. Then when you scan you get a working graph.
Its not really a big problem and might not be worth the effort to change but I just thought Iād ask.
Fair enough. Adding a max call in that method seems like a reasonable thing too.
1 Like