ドキュメント

Unity Engine

Unity Engine

NativeDisableUnsafePtrRestrictionAttribute

Enable the use of unsafe pointers in jobs.
読み終わるまでの所要時間 3 分最終更新 1ヶ月前

Definition

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

Remarks

By default, unsafe pointers aren't allowed in jobs because it isn't possible for the Job Debugger to gurantee race condition free behavior. This attribute lets you explicitly disable the restriction on a job.

Examples

struct MyJob : IJob{ [NativeDisableUnsafePtrRestriction] int* myCustomPointer; void Execute() { ... }}

Inheritance

Inherited Members