internal static UniTask <AsyncUnit> CreateTask(LayerTimingPoint timingPoint, CancellationToken cancellationToken) { var token = _tokenFactory.CreateToken(); if (ChainInstancePool <LayerTimingAwaitableTaskSource> .TryGetInstanceFast(out var taskSource)) { taskSource._awaitableCore = new(timingPoint, token, cancellationToken); } else { taskSource = new LayerTimingAwaitableTaskSource(timingPoint, token, cancellationToken); } return(new UniTask <AsyncUnit>(taskSource, token)); }
internal LayerTimingPointList(Layer layer) { _layer = layer; _beforeRenderingPoint = new LayerTimingPoint(layer); _afterRenderingPoint = new LayerTimingPoint(layer); }