I’m running into some issues trying to refactor global data in the context of having systems and hybrid stuff.
The first one is that I don’t see a way to control startup order of systems. OnCreateManager doesn’t doesn’t follow the system update order. It doesn’t even initialize systems by what group they are in. So systems in simulation can have OnCreateManager called before groups in initialization for example.
Another one is systems get destroyed before Monobehaviour events like OnDisable.
I thought I’d be able to have a system that holds all of the various config data, but that won’t work. I’m pretty much forced to just use a good old singleton.
Using GetOrCreateSystem seems to be how to get the earliest possible hook for loading stuff. But that creates an implied dependency that if it breaks, it wouldn’t be obvious why.
Are there any other hooks I’m missing that are called earlier I could use for loading data?
Edit: Wrong forum,this was supposed to go in the DOTS forum. Will wait for mod to move if possible