Class AnalysisJobDriver<T>

Namespace
SurvivorsMaker.Editor
Assembly
SurvivorsMaker.Editor.dll

Advances an IAnalysisJob<TResult> from EditorApplication.update in time slices so the editor stays responsive. Cancel asks the job to stop; the partial result is delivered with cancelled = true.

public sealed class AnalysisJobDriver<T> : IMakerJobProgress

Type Parameters

T
Inheritance
AnalysisJobDriver<T>
Implements
Inherited Members

Constructors

AnalysisJobDriver()

public AnalysisJobDriver()

Fields

BudgetMilliseconds

Milliseconds of work per editor update.

public double BudgetMilliseconds

Field Value

double

Properties

Label

public string Label { get; }

Property Value

string

Progress

public float Progress { get; }

Property Value

float

Running

public bool Running { get; }

Property Value

bool

Methods

Cancel()

public void Cancel()

RunToEnd(int)

Runs the whole job synchronously (bounded by maxSlices).

public void RunToEnd(int maxSlices = 100000)

Parameters

maxSlices int

Start(IAnalysisJob<T>, string, Action<T, bool>, Action<Exception>)

public void Start(IAnalysisJob<T> job, string label, Action<T, bool> done, Action<Exception> failed)

Parameters

job IAnalysisJob<T>
label string
done Action<T, bool>
failed Action<Exception>

StepOnce(double)

Runs one slice now; true when the job finished (tests and synchronous callers).

public bool StepOnce(double budgetMilliseconds)

Parameters

budgetMilliseconds double

Returns

bool

Stop()

Detaches without callbacks (window closed). The job is cancelled.

public void Stop()