#Cannot pass EnabledRefRW and Component Itself to Job's Execute Method Signature

1 messages · Page 1 of 1 (latest)

ornate salmon
#

I came across an issue where my job was working perfectly fine with the following method signature:

⁨```C#
void Execute(
Entity entity,
[EntityIndexInQuery] int sortKey,
ref LocalTransform transform,
ref FormationCommander commander,
in MovementOrder moveOrder
)


But if I also include the EnabledRefRW component so that I can enable/disable the IEnableableComponent, it no longer finds any matching entities:

⁨```C#
void Execute(
    Entity entity,
    [EntityIndexInQuery] int sortKey,
    ref LocalTransform transform,
    ref FormationCommander commander,
    in MovementOrder moveOrder,
    RefRW<MovementOrder> enableMoveOrder
)
```⁩

Any ideas?
turbid fractal
#

If you use EnabledRefRW<YourComp> and also access the same component, it has to be accessed by ref, as you already specify the readWrite handle with EnabledRefRW

ornate salmon
turbid fractal
#

Yes

turbid fractal