NativeSetThreadIndexAttribute
Inject a worker thread index into an int on the job struct.
읽는 시간 3분최근 업데이트: 한 달 전
Definition
- Type: Class
- Namespace: Unity.Collections.LowLevel.Unsafe
- Assembly: UnityEngine.CoreModule
- Inherits from: Attribute
[AttributeUsage(AttributeTargets.Field)]public sealed class NativeSetThreadIndexAttribute : Attribute
Remarks
This is usually used in the implementation of atomic containers. The index is guaranteed to be unique to any other job that might be running in parallel.
Additional Resources: JobsUtility.ThreadIndex