Struct EnabledRefRW<T>
Stores a safe reference to a read-writable component enable bit. Also keeps a pointer to the chunk disabled count, which is updated when the enabled bit is written to.
Implements
Namespace: Unity.Entities
Assembly: Unity.Entities.dll
Syntax
[GenerateTestsForBurstCompatibility(GenericTypeArguments = new Type[] { typeof(BurstCompatibleEnableableComponent) }, RequiredUnityDefine = "ENABLE_UNITY_COLLECTIONS_CHECKS")]
public readonly struct EnabledRefRW<T> : IQueryTypeParameter where T : unmanaged, IEnableableComponent
Type Parameters
Name | Description |
---|---|
T | Type of enabled component |
Remarks
Do not store outside of stack
Constructors
Name | Description |
---|---|
Enabled |
Constructor for writable enable reference to enableable component. This is typically used by generated code inside of Aspects. |
Properties
Name | Description |
---|---|
Is |
Property that returns true if the reference is valid, false otherwise. |
Null | Null value for this reference. |
Value |
Property to get enabled value of this reference (true if enabled, false otherwise). |
Value |
Property to get or set enabled value of this reference (true if enabled, false otherwise). |
Operators
Name | Description |
---|---|
implicit operator Enabled |
Convert into a read-only version EnabledRefRO of this EnabledRefRW |