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 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.

Public
AddMainThreadPass (pass, action)

Adds a pass callback that runs in the main thread.

Public
AddRule (rule)
Public
DisposeUnmanagedData ()
Public
ExecuteRule (rule, context)

Executes the rules for the given pass.

Public
GetRules ()
Public
Rebuild ()
Public
RebuildIfNecessary ()
Public
RemoveRule (rule)
Public

Private/Protected Members

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

List of all rules.

Private

Deprecated Members

Add (pass, action)
Public