Class GridGraphRules

Public

Container for all rules in a grid graph.

// Get the first grid graph in the scene
var gridGraph = AstarPath.active.data.gridGraph;

gridGraph.rules.AddRule(new Pathfinding.Graphs.Grid.Rules.RuleAnglePenalty {
penaltyScale = 10000,
curve = AnimationCurve.Linear(0, 0, 90, 1),
});

Inner Types

Context for when scanning or updating a graph.

Public Methods

AddJobSystemPass (pass, action)

Adds a pass callback that uses the job system.

AddMainThreadPass (pass, action)

Adds a pass callback that runs in the main thread.

AddRule (rule)
ExecuteRule (rule, context)

Executes the rules for the given pass.

ExecuteRuleMainThread (rule, context)
Rebuild ()
RemoveRule (rule)

Private/Protected Members

CallActions (actions, context)
Hash ()
jobSystemCallbacks
Private
lastHash
Private
mainThreadCallbacks
Private
rules

List of all rules.

Private

Deprecated Members

Add (pass, action)