Closed nicolasgramlich closed 4 years ago
One solution is to add a TriggerJobHandle.Complete();
to the beginning of the method, but introducing a sync point is likely not ideal performance wise. 🤔
Unfortunately I'm not familiar at all with how to pass a ForEachCount
aka arrayLength
to a IJobParallelFor
:(
Best ay to fiw IMO is create a foreach count field in the EffectConsumerSystem class, populate it when creating the stream in GetConsumerWriter and replace the effectReader.ForEachCount with it in OnUpdate.
Fixed
Excellent! Way better solution that the Complete()
🙌
Line 154 throws an error complaining that
ForEachCount
is accesses beforeRemapEffectsJob
from line 149 is completed, which I think is technically properly detected error, yet does not seem to cause any issues 🤔https://github.com/WAYNGROUP/MGM-Skill/blob/832fbea7701f8ef56f792e0f273d0182aec94191/Runtime/Systems/EffectConsumerSystems.cs#L149-L154