RefRW<T>
RefRW stores a reference (with write access) to native memory
Read time 1 minuteLast updated a day ago
Definition
- Type: Struct
- Namespace: Unity.Entities
- Assembly: UnityEngine.EntitiesModule
- Implements: IQueryTypeParameter
public readonly struct RefRW<T> : IQueryTypeParameter where T : struct, IComponentData
Constructors
Constructor | Description |
|---|---|
| RefRW`1(System.Byte*,Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle) | Stores a safe reference a pointer to T |
| RefRW`1(Unity.Collections.NativeArray{`0},System.Int32) | Stores a safe reference to a component from an array of components at the index. |
Properties
Property | Description |
|---|---|
| IsValid | Checks if the component exists on this entity. |
| ValueRO | Returns a read-only reference to the component value itself. |
| ValueRW | Returns a writable reference to the component value itself. |
Static Methods
Method | Description |
|---|---|
| Optional | Stores a safe reference to a component from an array of components at the index. If the array is empty stores a null reference. |