Struct RefRW<T>
RefRW stores a reference (with write access) to native memory
Implements
Namespace: Unity.Entities
Assembly: Unity.Entities.dll
Syntax
[GenerateTestsForBurstCompatibility(GenericTypeArguments = new Type[] { typeof(BurstCompatibleComponentData) }, RequiredUnityDefine = "ENABLE_UNITY_COLLECTIONS_CHECKS")]
public readonly struct RefRW<T> : IQueryTypeParameter where T : struct, IComponentData
Type Parameters
Name | Description |
---|---|
T | The type of object referenced. |
Constructors
Name | Description |
---|---|
Ref |
Stores a safe reference a pointer to T |
Ref |
Stores a safe reference to a component from an array of components at the index. |
Properties
Name | Description |
---|---|
Is |
Checks if the component exists on this entity. |
Value |
Returns a read-only reference to the component value itself. |
Value |
Returns a writable reference to the component value itself. |
Methods
Name | Description |
---|---|
Optional(Native |
Stores a safe reference to a component from an array of components at the index. If the array is empty stores a null reference. |
Operators
Name | Description |
---|---|
explicit operator Ref |
Convert into a read-only version RefRO of this RefRW |