internal void FindFirstPhaseAndModify(Type phaseId, WorkerPhaseModifierDelegate callback) { for (int i = 0; i < subPhases.Length; i++) { if (subPhases[i].IsPhase(phaseId)) { callback(ref subPhases[i]); } else { subPhases[i].FindFirstPhaseAndModify(phaseId, callback); } } }
private void FindFirstPhaseAndModify(ref WorkerPhase workerPhase, Type phaseId, WorkerPhaseModifierDelegate callback) { if (workerPhase.IsPhase(phaseId)) { callback(ref workerPhase); } else { workerPhase.FindFirstPhaseAndModify(phaseId, callback); } }
public void FindFirstRenderPhaseAndModify <T0>(WorkerPhaseModifierDelegate callback) where T0 : IPhaseId => FindFirstPhaseAndModify(ref renderRoot, typeof(T0), callback);