Function IUpdatableGraph.ScheduleGraphUpdates

ScheduleGraphUpdates (List<GraphUpdateObject> graphUpdates)

Schedules a number of graph updates.

Public
IGraphUpdatePromise ScheduleGraphUpdates (

List<GraphUpdateObject>

graphUpdates

)

Schedules a number of graph updates.

This method should return a promise. It should not execute the graph updates immediately. The Apply method on the promise will be called when the graph updates should be applied. In the meantime, the graph may perform calculations using e.g. the unity job system.

Notes to implementators. This function should (in order):

  1. Call o.WillUpdateNode on the GUO for every node it will update, it is important that this is called BEFORE any changes are made to the nodes.

  2. Update walkabilty using special settings such as the usePhysics flag used with the GridGraph.

  3. Call Apply on the GUO for every node which should be updated with the GUO.

  4. Update connectivity info if appropriate (GridGraphs updates connectivity, but most other graphs don't since then the connectivity cannot be recovered later).

It is guaranteed that the Apply function will be called on the returned promise before this function is called again.

Null may be returned if no updates need to be done to the graph.