Running ALINE from ISystem?

My system needs to be burst compiled, so I want to implement the ISystem interface instead of inheriting from SystemBase.
However, this seemingly makes constructing a CommandBuilder impossible.
I can’t get it like this: DrawingManager.GetBuilder(renderInGame: true); and I didn’t see anything on the docs for constructing a CommandBuilder myself.
Do I need to put it on some misc. Component on some misc. Entity?
That’s something I could probably initialize via an Authoring MonoBehaviour, but I can’t image that’s the only way.


This is not possible at the moment, I’m afraid.
If Unity allowed accessing the current thread index easily in burst jobs from a static variable, it would be pretty easy. However, Unity does not. So a bunch of workarounds would have to be done to get it to work.
I’d rather not allow users to pass in arbitrary thread ids, as that would be extremely memory-unsafe.
You can get a builder inside a system, but you cannot get it from a bursted system.
Usually this is not a problem, though, since systems shouldn’t be doing heavy work anyway.

In case you don’t know, since 2022.2.14, this has been made possible

Enabled JobsUtility.ThreadIndex and JobsUtility.ThreadIndexCount to now be used in Burst compiled static constructors.

I also need ALINE to be usable in a bursted ISystem.