Open jkeon opened 1 year ago
Ah yea, I was thinking the BurstableAtomicIDProvider
would register itself with the system but this makes more sense because you need a World
reference anyway and this better matches the pattern you follow for ECBs.
The system can probably just check every frame. It's not going to be expensive and there aren't going to be tens of thousands of ID providers.
See: https://github.com/decline-cookies/anvil-unity-dots/pull/258/files#r1220141780
Have a system that creates the IDProviders for you and stores a reference to them. Every so often (configurable, could be frame or X seconds) it will check them all against their
SupplyWarningThreshold
and emit an event for the main thread application to listen to and respond to similar toIDProvider