Schedule<T>(T, JobHandle)
Schedules the job for execution on a worker thread.
阅读时间1 分钟最后更新于 1 个月前
Definition
- Type: Method
- Namespace: Unity.Jobs
- Assembly: UnityEngine.CoreModule
public static JobHandle Schedule<T>(this T jobData, JobHandle dependsOn = default) where T : struct, IJob
Parameters
The dependency of the job. Dependencies ensure that a job executes on worker threads after the dependency has completed execution, and that two jobs reading or writing to same data do not run in parallel.
Returns
Type | Description |
|---|---|
| JobHandle | The handle identifying the scheduled job, which you can use as a dependency for a later job or to ensure completion on the main thread. |
Remarks
Additional Resources: IJob.