I have an IJobFor I'd like to schedule, based on the length of a NativeArray. However, that array lives as a DynamicBuffer, on a singleton entity.
To Schedule the IJobFor, I'll need the length of that array. But to access that length, I'll need to call SystemState.GetSingletonData() from my System's update function on the main thread.
I'd like to avoid this. Grabbing that singleton buffer on ever update seems costly. Two questions:
1. Am I worried about nothing? Is this actually a common...
How to Avoid Getting Singleton Data on the Main Thread
To Schedule the IJobFor, I'll need the length of that array. But to access that length, I'll need to call SystemState.GetSingletonData() from my System's update function on the main thread.
I'd like to avoid this. Grabbing that singleton buffer on ever update seems costly. Two questions:
1. Am I worried about nothing? Is this actually a common...
How to Avoid Getting Singleton Data on the Main Thread