Method ScheduleByRef
ScheduleByRef<T>(ref T, JobHandle)
Adds an IJobEntity instance to the job scheduler queue for sequential (non-parallel) execution.
Declaration
[MustUseReturnValue]
public static JobHandle ScheduleByRef<T>(this ref T jobData, JobHandle dependsOn) where T : unmanaged, IJobEntity
Parameters
Type | Name | Description |
---|---|---|
T | jobData | An IJobEntity instance. In this variant, the jobData is passed by reference, which may be necessary for unusually large job structs. |
JobHandle | dependsOn | The handle identifying already scheduled jobs that could constrain this job. A job that writes to a component cannot run in parallel with other jobs that read or write that component. Jobs that only read the same components can run in parallel. |
Returns
Type | Description |
---|---|
JobHandle | A handle that combines the current Job with previous dependencies identified by the |
Type Parameters
Name | Description |
---|---|
T | The specific IJobEntity implementation type. |
Remarks
Can't schedule managed components or managed shared components, use Run instead.
ScheduleByRef<T>(ref T, EntityQuery, JobHandle)
Adds an IJobEntity instance to the job scheduler queue for sequential (non-parallel) execution.
Declaration
[MustUseReturnValue]
public static JobHandle ScheduleByRef<T>(this ref T jobData, EntityQuery query, JobHandle dependsOn) where T : unmanaged, IJobEntity
Parameters
Type | Name | Description |
---|---|---|
T | jobData | An IJobEntity instance. In this variant, the jobData is passed by reference, which may be necessary for unusually large job structs. |
EntityQuery | query | The query selecting chunks with the necessary components. |
JobHandle | dependsOn | The handle identifying already scheduled jobs that could constrain this job. A job that writes to a component cannot run in parallel with other jobs that read or write that component. Jobs that only read the same components can run in parallel. |
Returns
Type | Description |
---|---|
JobHandle | A handle that combines the current Job with previous dependencies identified by the |
Type Parameters
Name | Description |
---|---|
T | The specific IJobEntity implementation type. |
Remarks
Can't schedule managed components or managed shared components, use Run instead.
ScheduleByRef<T>(ref T)
Adds an IJobEntity instance to the job scheduler queue for sequential (non-parallel) execution.
Declaration
public static void ScheduleByRef<T>(this ref T jobData) where T : unmanaged, IJobEntity
Parameters
Type | Name | Description |
---|---|---|
T | jobData | An IJobEntity instance. In this variant, the jobData is passed by reference, which may be necessary for unusually large job structs. |
Type Parameters
Name | Description |
---|---|
T | The specific IJobEntity implementation type. |
Remarks
This job automatically uses the system's Dependency property as the input and output dependency.
ScheduleByRef<T>(ref T, EntityQuery)
Adds an IJobEntity instance to the job scheduler queue for sequential (non-parallel) execution.
Declaration
public static void ScheduleByRef<T>(this ref T jobData, EntityQuery query) where T : unmanaged, IJobEntity
Parameters
Type | Name | Description |
---|---|---|
T | jobData | An IJobEntity instance. In this variant, the jobData is passed by reference, which may be necessary for unusually large job structs. |
EntityQuery | query | The query selecting chunks with the necessary components. |
Type Parameters
Name | Description |
---|---|
T | The specific IJobEntity implementation type. |
Remarks
This job automatically uses the system's Dependency property as the input and output dependency.