文档

Unity Engine

Unity Engine

NativeSetClassTypeToNullOnScheduleAttribute

Sets the managed reference to a class to null on a copy of the job struct that is passed to a job.
阅读时间3 分钟最后更新于 2 个月前

Definition

[AttributeUsage(AttributeTargets.Field)]public sealed class NativeSetClassTypeToNullOnScheduleAttribute : Attribute

Remarks

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.

Inheritance

Inherited Members