NativeSetClassTypeToNullOnScheduleAttribute

class in Unity.Collections.LowLevel.Unsafe

/

Implemented in:UnityEngine.CoreModule

Description

Sets the managed reference to a class to null on a copy of the job struct that is passed to a job.

The job system doesn't allow managed references in a job struct. However, sometimes it's necessary to have a class in a job struct, even though in the context of the job it is always null. When this attribute is applied to a field in a job struct, the managed reference to the class is set to null on the copy of the job struct that's passed to the job.

Additional resources: IJob.


Did you find this page useful? Please give it a rating: