/// <summary> /// Initializes the task factory during Awake(). /// </summary> /// <remarks> /// The task factory cannot be initialized in the constructor /// because it must be initialized from the coroutine /// execution thread which the constructor does not guarantee. /// </remarks> protected virtual void Awake() { _taskFactory = this.CreateTaskFactory(); _taskScheduler = _taskFactory.Scheduler; _fiberScheduler = ((FiberTaskScheduler)_taskScheduler).FiberScheduler; _fiberFactory = new FiberFactory(_fiberScheduler); }