this[]
Gets the TransformRef instance for the specified entity.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前
Definition
- Type: Property
- Namespace: Unity.Entities
- Assembly: UnityEngine.EntitiesModule
this[Entity]
public TransformRef this[Entity entity] { get; }
Parameters
The entity.
Returns
Type | Description |
|---|---|
| TransformRef | A TransformRef type. |
Remarks
Normally, you cannot write to transforms accessed using a TransformLookup instance in a parallel Job. This restriction is in place because multiple threads could write to the same buffer, leading to a race condition and nondeterministic results. However, when you are certain that your algorithm cannot write to the same buffer from different threads, you can manually disable this safety check by putting the [NativeDisableParallelForRestriction] attribute on the BufferLookup field in the Job.