BudgetedUpdateModule
A class in Root.Township, the global namespace.
An UpdateModule with a time budget: each update runs registered methods until MsAllowance milliseconds pass, and the next update carries on from where it stopped.
- Listed in Global namespace: A to B
- Inherits or implements
UpdateModule - Documented in Update modules
Constructors
| Member | What it is |
|---|---|
BudgetedUpdateModule(string name, float msAllowance, UpdateSegment segment, bool includeInServerProfiling = false) | Creates a BudgetedUpdateModule from name, msAllowance, segment and includeInServerProfiling. |
Fields
3 private and internal fields
Properties
Methods
| Member | What it is |
|---|---|
override IUnityUpdateMethod RegisterMethod(Action method) | Adds a method to the module's circular list. |
sealed override void Update() | Runs methods from where the last update stopped until the budget is used, recording how long it took. |
protected override void DeregisterMethod(UpdateModule.MethodNode node) | Removes a method, clearing the list when it was the last one. |
1 private and internal method
| Member | What it is |
|---|---|
private bool ProcessNode(UpdateModule.MethodNode node) | Iteration check for each method: stops once the loop comes back around or the budget runs out, and remembers where to start next time. |
Used in
Members of other types that take, return or hold a BudgetedUpdateModule: