It's been a while, and I'm rusty. Please help!
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...
How to Avoid Getting Singleton Data on the Main Thread
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...
How to Avoid Getting Singleton Data on the Main Thread