Method ScheduleAddImageJob
ScheduleAddImageJob(MutableRuntimeReferenceImageLibrary, Texture2D, string, float?, JobHandle)
Asynchronously adds texture
to library
.
Declaration
[Obsolete("Use ScheduleAddImageWithValidationJob instead. (2020-10-20)")]
public static JobHandle ScheduleAddImageJob(this MutableRuntimeReferenceImageLibrary library, Texture2D texture, string name, float? widthInMeters, JobHandle inputDeps = default)
Parameters
Type | Name | Description |
---|---|---|
Mutable |
library | The Mutable |
Texture2D | texture | The Texture2D to use as image target. |
string | name | The name of the image. |
float? | widthInMeters | The physical width of the image, in meters. |
Job |
inputDeps | Input job dependencies (optional). |
Returns
Type | Description |
---|---|
Job |
A Job |
Remarks
This method is deprecated. Use Schedule
Image addition can take some time (several frames) due to extra processing that must occur to insert the
image into the library. This is done using the Unity Job System. The returned
Job
This job, like all Unity jobs, can have dependencies (using the inputDeps
). If you are
adding multiple images to the library, it is not necessary to pass a previous
ScheduleJobHandle
as the input dependency to the next
Schedule
The bytes of the texture
are copied, so you can safely destroy the texture
after this method returns.
Exceptions
Type | Condition |
---|---|
Invalid |
Thrown if is |
Argument |
Thrown if |
Invalid |
Thrown if |